Re: System.Windows.Forms.Form_Load() calls Application.Exit and Form flashes?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You could perhaps hide the window...

If possible my personal preference would be even to avoid doing this but
instead to check command line arguments before opening the window...

(for example in MyApplication.Startup that provides a e.cancel property to
cancel the application launch).

--
Patrice


"Joe Duchtel" <duchtel@xxxxxxxxx> a écrit dans le message de news:
640a684d-c19d-4774-b2df-bc64a68bd397@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello -

I have a GUI that is contained in a Class which Inherits
SystemWindows.Forms.Form. The Private Sub _Load() runs a few checks
on command arguments and in some cases calls Application.Exit after an
error message is output in a MsgBox().

What I am seeing, is that the GUI briefly appears and then
disappears ... like a quick flash. Is there anything I could to avoid
that? Is there a better way to exit out of the _Load() function?

Thanks,
Joe


.



Relevant Pages