• Blank Splash Screen (VB6)

    Author
    Topic
    #1771639

    I have a VB6 application which takes a while to do its initialisation, mainly as it connects to a remote database.
    I want to display a splash screen so that the users knows that the application has started.
    I have a SUB MAIN that is coded as follows:
    Public Sub Main()
    frmSplash.Show
    frmSplash.Refresh
    Init
    frmMain.Show
    Unload frmSplash
    End Sub

    The splash form was created with the VB6 wizard and consists of labels and has just the generated code in it.
    ption Explicit

    Private Sub Form_KeyPress(KeyAscii As Integer)
    Unload Me
    End Sub

    Private Sub Form_Load()
    lblVersion.Caption = “Version ” & App.Major & “.” & App.Minor & “.” & App.Revision
    lblProductName.Caption = App.Title
    Me.Refresh
    DoEvents
    End Sub

    Private Sub Frame1_Click()
    Unload Me
    End Sub

    When the application starts I see the outline, without any text, of the splash screen until it is unloaded and the main from is loaded.
    Any suggestions on how I can force the form to display correctly before I start the initialisation in SUB INIT?

    Thank you

    Viewing 0 reply threads
    Author
    Replies
    • #1815667

      Hi David,
      Instead of having your Main sub call all the code, have it simply show the splash screen, then in the Activate event of the splash screen have code like:

      Private Sub Form_Activate()
          Me.Refresh
          Init
          frmMain.Show
          Unload Me
      End Sub
      

      and that should work.
      Hope that helps.

    Viewing 0 reply threads
    Reply To: Blank Splash Screen (VB6)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: