Reputation: 5478
I have a VB.NET application with Enable application framework
checked, and Splash screen
set. At the same time, I need to run some code before the splash screen is loaded. MyApplication_Startup
seems to go later, so it's not suitable. I understand it's possible with custom splash screen, but would prefer any other way to make it without more complex customization.
EDIT: Apparently, the issue is different. Code that runs before the splash-screen is thread-specific. It doesn't take proper effect, since splash screen is on another thread.
Upvotes: 0
Views: 670
Reputation: 13106
Under project properties click View Application Events. Then read the comment: ' The following events are available for MyApplication: ' ' Startup: Raised when the application starts, before the startup form is created. ' Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally. ' UnhandledException: Raised if the application encounters an unhandled exception. ' StartupNextInstance: Raised when launching a single-instance application and the application is already active. ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
I don't know if oyu have been through this yet.
Upvotes: 2
Reputation: 9617
Have you stepped through your code using the F8 key? The debugger can show you where you can add code before your splash screen is shown.
Upvotes: 1