Hi,
This is driving me nuts, I have a Startup Form defined and a Splash Form defined in the applications properties.
in the Application_Startup event, I have some code to do some initial checks, which will then be used throughout the applications lifecycle as well as to change the duration of the splash screen and change some of its contents.
Now according to MS's code comment the Application_startup should fire before the initial forms are displayed. This does not happen the Splash form is being called before the application startup is being executed, so it is missing the initial code checks and doesn't do what it should......
Is this a bug what can i do to work around this
Cheers,
Dave

VB2005: Startup Form / Splash Form / Application Startup
黃泓量 Jeremy Wong
http://msdn2.microsoft.com/en-us/library/t4zch4d2.aspx
dave.dolan
Further to the previous query, i also notice that the Spash Forms _FormClosing event doesn't fire
Does anyone know what is going on with the framework I am not trying to do anything fancy, but seem to have to put serveral extra twists into my code (i am maybe just missing something though!) to achieve the desired results.
Cheers,
Dave
Okugops
Could you show me the comment As I understand it, the application is your main application and not inclusive of the splash screen (because the splash screen is usually used whilst your app is loading)
B M E
I put debug.writeline messages in the formclosing and formclosed events of the splash form and neither are raised.
AndyW027
Is the Closed event of the splash firing
sheeja
In the ApplicationEvents.vb file you will see that it says;
Startup: Raised when the application starts, before the startup form is created.
Now, There are 2 parts to the statement;
a) Raised when the application starts,
b) before the startup form is created.
This is only half true, it does say that this fires before the StartupForm is displayed, NOT the Splash form, so that is technically correct, but, if this is the Application startup event this should fire before anything else (as implied by the first half of the statement, otherwise it aint techincially application startup is it it would be better named, Application_Startup_After_Something_Else_Has_Been_Done!
If this is the Startup event, it should fire before anything else is done, whether it is display the startup form, the splash form or anything else.
Cheers,
Dave
Wilke Jansoone
Thanks, i did previously come across this and unfortunately didn't help much.
What i did to basically achieve the desired results was declare a public byte in the my.application namespace with an initial value. in the splash form i held this in a do while....loop with application.doevents within. This basically kept the splash form happy until value of the byte was changed by another routine that executed in the application startup event. At this point the splash form was modified to display what was required.
The startup form had a similiar loop put in its load event to wait for the initial checker to complete before it was allowed to continue.
Bottom line is a dirty fix to what should be something simple...
This only leaves the following problems;
1) Programatically changing the minimum display time for the splash form, changing below doesn't make a difference if the splash form is already loaded
my.Application.MinimumSplashScreenDisplayTime
2) The Splash forms _closing event doesn't fire.
Cheers,
Dave