Changing Splash form and Startup Object at runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pakmarshal
    New Member
    • Aug 2009
    • 17

    #1

    Changing Splash form and Startup Object at runtime

    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.Sta rtup Event (guide me if i am wrong)

    Now, in Application.Sta rtup_Event when I write the code

    Code:
        Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
    
          My.Application.SplashScreen = SplashScreen2
    
          My.Application.MainForm = Form2
    
    
        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.
Working...