D
Dave
Hi,
I have created an application with two forms, the main form and a
login form that allows the user to supply a username and password.
In my main form initialisation i have the following:
Sub InitializeForm()
'Open the login box
Dim LoginBox As New FrmLogin
If LoginBox.ShowDialog(Me) = DialogResult.OK Then
mydb = New ClassTimeDB("E:\Databases\Time",_
LoginBox.TxtUserID.Text, LoginBox.TxtPassword.Text)
LoginBox.Dispose()
LoginComplete()
Else
Application.Exit()
End If
End Sub
I have set the OK and Cancel buttons on the login form to return the
OK and Cancel commands in the DialogResult property of the buttons
The OK works fine however, the cancel does not close the application.
Further investigation showed that the Application.AllowQuit property
is set false - so this is obviously why my app won't quit. I guess
this is because the application hasn't fully initialised yet?
How can i accomplish what i want to do?
Thanks in advanced
I have created an application with two forms, the main form and a
login form that allows the user to supply a username and password.
In my main form initialisation i have the following:
Sub InitializeForm()
'Open the login box
Dim LoginBox As New FrmLogin
If LoginBox.ShowDialog(Me) = DialogResult.OK Then
mydb = New ClassTimeDB("E:\Databases\Time",_
LoginBox.TxtUserID.Text, LoginBox.TxtPassword.Text)
LoginBox.Dispose()
LoginComplete()
Else
Application.Exit()
End If
End Sub
I have set the OK and Cancel buttons on the login form to return the
OK and Cancel commands in the DialogResult property of the buttons
The OK works fine however, the cancel does not close the application.
Further investigation showed that the Application.AllowQuit property
is set false - so this is obviously why my app won't quit. I guess
this is because the application hasn't fully initialised yet?
How can i accomplish what i want to do?
Thanks in advanced