By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,461 Members | 1,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,461 IT Pros & Developers. It's quick & easy.

Changing Splash form and Startup Object at runtime

Pakmarshal
P: 17
Hi All,
I am developing an windows application in VB 2008, My requirment is such that I have to change the applications Splash and Startup object on the basis of "Custom Constants" (Compilation Constants).

As far as I have .Net idea it should be done in Application.Startup Event (guide me if i am wrong)

Now, in Application.Startup_Event when I write the code

Expand|Select|Wrap|Line Numbers
  1.     Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
  2.  
  3.       My.Application.SplashScreen = SplashScreen2
  4.  
  5.       My.Application.MainForm = Form2
  6.  
  7.  
  8.     End Sub
The application dont work as desired, instead it starts with Form2 (which is OK), while in case of Splash it doesnt changes the splash form.

Can anyone guide me in this regard?

Thanks,
Maverick.
Jun 24 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.