desmondtan Posted March 25, 2003 Posted March 25, 2003 My start up form asked the user the correct password , if password is correct , the main form displayed and close the star up form. Dim main as new mainform if passowrd = txtpassword.text then main.showdialog() me.close() else (retry ....) The main form can be displayed , but the starup form still would not be closed , but at the back of main form. Anyone knows ? Quote
Heiko Posted March 25, 2003 Posted March 25, 2003 I'd rather use the mainForm as the startup form. In the main forms load method, I'd show the password form and pass the validity check back to the main form. Then you can dispose the password form. Quote .nerd
desmondtan Posted March 26, 2003 Author Posted March 26, 2003 The problems is when main form loaded first , we must disabled the toolbar and main menu before the user can successfully login. Do you have idea how to disabled these two control , and how to enabled it back after the user login ? Quote
bpayne111 Posted March 26, 2003 Posted March 26, 2003 public sub mainForm_Load(byval sender as object, e as eventargs) dim myForm as New PasswordForm myForm.ShowDialog end sub This will load your password form as a Dialog, meaning that the user may not do anything on the main form until you let them basically. (make the controlbox property false to ensure they don't just close it and use the form anyway) Quote i'm not lazy i'm just resting before i get tired.
iebidan Posted March 28, 2003 Posted March 28, 2003 I posted an example on how to solve this problem, you can close any form and keep your application running, attached you'll find it (I think is the correct example, if not, let me know) regards Quote Fat kids are harder to kidnap
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.