fkheng Posted May 24, 2003 Posted May 24, 2003 i have a timer on a splash screen, when it's done, it is supposed to open another form...somehow, the form doesn't seem to load...the form's name is fLogin, which i declared somewhere else... do u think this code is correct? Private Sub Timer1_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed If ProgressBar1.Value = 100 Then Timer1.Enabled = False fLogin.Show() Me.Close() Exit Sub End If ProgressBar1.Value = ProgressBar1.Value + 10 End Sub Quote Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
guest31ro Posted May 24, 2003 Posted May 24, 2003 VB? becose in c, c# you put { } after if and without the "then", and by the way do you make the timer.Enable = true? ahd why don't you put the code into a loop C# Timer1.Enabled = true; ProgressBar1.Value =0; do { ProgressBar1.Value = ProgressBar1.Value + 10; } while (ProgressBar1.Value <100); Timer1.Enabled = False; fLogin.Show(); Me.Close(); Quote
fkheng Posted May 25, 2003 Author Posted May 25, 2003 er.....i'm using VB.NET Quote Can you bind the beautiful Pleiades, and can you loose the cords of Orion? - God to Job...
*Experts* jfackler Posted May 25, 2003 *Experts* Posted May 25, 2003 Private Sub Timer1_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed If ProgressBar1.Value = 100 Then Timer1.Enabled = False fLogin.Show() Me.Hide() 'change this and it should work or you can change your above line to fLogin.ShowDialog() Exit Sub End If ProgressBar1.Value = ProgressBar1.Value + 10 End Sub Is your splash screen your startup object? If you close the startup object your program will terminate. Jon Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.