Am I correct in thinking that your problem is that your SplashForm is closed
almost as soon as it is drawn? If that is the case... then that is by design
of your code, you are showing it, and almost immediately closing it. One way
you might improve your process would be to do some other initialization in
between sf.Show() and sf.Close(), maybe change that section to look something
like:
sf.Show();
//show the splash
Application.DoEvents();
//allow form to paint
Browser mainBrowser = new Browser();
//Do other initialization here
sf.Close();
Application.Run(mainBrowser);
The reason for the above method is that while your SplashScreen is
displayed, you are creating a new instance of your Browser and doing any
other initialization work that needs to be done prior to its being brought to
the forefront of the application and being in charge.
Brendan
"Alvo von Cossel I" wrote:
hi,
i have a startup form (like the ones you get in Microsoft Office) that
should open for a few seconds and then close. it works when you don't include
the line in the Stativ void main that will close it:
Application.EnableVisualStyles();
SplashForm sf = new SplashForm();
sf.Show();
//show the splash
Application.DoEvents();
//allow form to paint
sf.Close();
//<<this one
Application.Run(new Browser());
but if i don't include it, the form will be open until you terminate the
application. i want it to close.
tell me if my question isn't clear enough!
cheers,
--
Alvo von Cossel I of Germany