Results 1 to 3 of 3

Thread: [RESOLVED]Form close problem... what's wrong...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    445

    [RESOLVED]Form close problem... what's wrong...

    SplashScreen is my startup form...
    after it show up few second, it close itself and load frmlogin...
    but it will be end the application after the frmlogin show..........

    Code:
            Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
            Me.FormBorderStyle = FormBorderStyle.None
    
            Timer1.Enabled = True
        End Sub
    
    
    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Enabled = False
    
            If Me.Opacity > 0 And Me.Opacity <= 1 Then
                Me.Opacity = Me.Opacity - 0.1
                Timer1.Enabled = True
            Else
                Me.Close()
                frmLogin.Show()
            End If
        End Sub
    Last edited by wenight; Aug 26th, 2009 at 03:47 AM.

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

    Re: Form close problem... what's wrong...

    Don't use the splash screen as the startup form. By default the app closes after the startup form closes. You can change that behaviour but there's no need. Select your main form as the startup form and then select the splash screen as the splash screen.
    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
    Hyperactive Member
    Join Date
    Jun 2007
    Posts
    445

    Re: Form close problem... what's wrong...

    Quote Originally Posted by jmcilhinney View Post
    Don't use the splash screen as the startup form. By default the app closes after the startup form closes. You can change that behaviour but there's no need. Select your main form as the startup form and then select the splash screen as the splash screen.
    So I set my startup form to other form it solved the problem...

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