[RESOLVED] [2005] Timer doesnt open form =(
ok I've made a splash screen and wanted to keep it on the screen for 3-5 seconds before loading my very simple, but functional web browser, so here's my code, any reasons why it doesn't open the other form?
Code:
Private Sub loadTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loadTimer.Tick
Dim m_time As Integer = 0 'times splash screen till loads web browser
m_time += 1
If m_time = 3 Then
Dim ofrm As New FrmWebBrowser()
ofrm.ShowDialog()
End If
End Sub
Re: [2005] Timer doesnt open form =(
You can scrap that code completely. The functionality you want is already built into VB 2005. Create your splash screen form and simply select it from the list in the project properties. By default it will be displayed for at least 2 seconds or until the main form is fully created. If you want to change that you simply set the MinimumSplashScreenDisplayTime property. The documentation for that property explains how and provides a code example.
Re: [2005] Timer doesnt open form =(
Thanks mate, I knew there was a simpler way, I just didn't know how to do it, so I thought a timer would work. Thanks :)