console window displays during winform startup (c#)
this teenager bug (one i'm pacific live seductiveness go-live, frankly), nonetheless i'm wondering anyone else ideas repair it.
i have c# winforms application. app launched around executable (not around debugger), initial thing user sees console window, followed sure window (after pre-loading complete.)
i'd arrangement console window. (like i said, it's teenager bug.)
the digest cost already set windows application.
here's (most of) formula main() method. i've snipped out several proprietary/security associated stuff, replacing comments where appropriate.
[stathread]
static vacant main()
{
try
{
application.enablevisualstyles();
application.setcompatibletextrenderingdefault(false);
// snip: username windows, associate db user
(user == zero || user.uid == 0 || (user.active.hasvalue && !(user.active.value)))
{
messagebox.show(errorstrings.unknownuser, errorstrings.titlebar, messageboxbuttons.ok,
messageboxicon.error);
application.exit();
return;
}
// snip: associate user worker vigilant
application.run(new mainform());
}
locate (exception ex)
{
(exceptionpolicy.handleexception(ex, uistrings.exceptionpolicy))
{
twine summary = errorstrings.unhandledpreface + ex.tostring();
messagebox.show(message, errorstrings.titlebar, messageboxbuttons.ok, messageboxicon.error);
application.exit();
}
}
}
anyone have any ideas?
Comments
Post a Comment