Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Timer doesnt open form =(

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2007
    Location
    FAT32
    Posts
    61

    Resolved [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

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2007
    Location
    FAT32
    Posts
    61

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width