J
john wright
My program requires users to login before use. Using the following code in
the login form:
Me.Opacity = Me.Opacity - 0.2
If Me.Opacity <= 0 Then
Timer1.Enabled = False
If boolExit = False Then
My.Forms.frmMain.Opacity = 0
My.Forms.frmMain.Visible = True
Else
Me.Close()
Application.Exit()
End If
End If
I fade out the login form, and fade in the main form. However if I call
me.close() in the loop that turns on the opacity for the main form the whole
program shuts down. So in the main form I put in the following code:
Me.Opacity = Me.Opacity + 0.1
If Me.Opacity >= 1 Then
Me.Opacity = 1
Timer1.Enabled = False
My.Forms.frmLogin.Dispose()
End If
When I dispose of the form after loading the main form (in the timer event)
or call the My.Forms.frmLogin.Close() method it shuts down the whole
program. How can I just unload the login form?
Thanks.
John
the login form:
Me.Opacity = Me.Opacity - 0.2
If Me.Opacity <= 0 Then
Timer1.Enabled = False
If boolExit = False Then
My.Forms.frmMain.Opacity = 0
My.Forms.frmMain.Visible = True
Else
Me.Close()
Application.Exit()
End If
End If
I fade out the login form, and fade in the main form. However if I call
me.close() in the loop that turns on the opacity for the main form the whole
program shuts down. So in the main form I put in the following code:
Me.Opacity = Me.Opacity + 0.1
If Me.Opacity >= 1 Then
Me.Opacity = 1
Timer1.Enabled = False
My.Forms.frmLogin.Dispose()
End If
When I dispose of the form after loading the main form (in the timer event)
or call the My.Forms.frmLogin.Close() method it shuts down the whole
program. How can I just unload the login form?
Thanks.
John