splash screen

I recently found some code to use to mske a splash screen in vb however it does not: The information read like this:

The code below in a timer object (interval 1000) on the Splash form shows that after the counter reaches 5 the Splash Screen will close (Unload.Me) and open the main application form.

Private Sub tmrWait_Timer()
Counter = Counter + 1
If Counter = 5 Then
Unload Me
frmApplication.Show
End If
End Sub

I have underlines the code that has not been recognised. Does anyone get this



Answer this question

splash screen

  • Jeffrey D. Baker

    I think that the problem here is your original code is VB 6 code, and you can't use VB 6 code in VB Express.

    As Steve mentions, Express makes creating a splash screen much easier. There is a Splash screen property that allows you to specify a form to be used as your splash screen. See the following topic for more info:

    http://msdn2.microsoft.com/en-us/library/bfkbc5a3(VS.80).aspx

    Hope this helps,

    Steve Hoag

    Visual Basic Express



  • Amazonwoman67

    Shouldn't you be using Me.close() instead of Unload.me
    No idea on how to create splash screens, but it sounds more realistic to me, as I always use this, and it works great.
    Also I think u should place frmapplication.show before Me.close, like:

    ' First you have to specify the beginning value of Counter.
    Dim counter As Integer = 0

    ' Use the timer.
    Private Sub tmrWait_Timer()
    Counter = Counter + 1
    If Counter = 5 Then
    frmApplication.Show()
    Me.Close()
    End If
    End Sub

    Grtz, Tom.



  • Ray

    Don't know whether to call you help, or forever :)

    I was curious, so I tried this out. I was able to get it to work OK by putting only the frmApplication.show command in the splash screen. In the load event of frmApplication, I placed "splash.close()".

    If I placed the me.close() in the splash screen, it closed the application before the frmApplication opened.

    I am not certain if it is in the express version, but .net 2005 allows you to add a new item, and select a splash screen as an option. It is pretty usefull becuase it displays version information and closes itself after all of your "new" events have been completed.

    Hope it helps.



  • splash screen