mechano Posted December 9, 2004 Posted December 9, 2004 I have the following problem : I have 2 Forms : 1. login.cs and 2. mainForm.cs mainForm.cs is my main app and login.cs should block access to mainForm.cs. I use a SQL db on login.cs to authenticate. What I would like to know is how I would temporarily disable mainForm.cs while the user is logging in with login.cs Any help would be greatly appreciated Quote
Administrators PlausiblyDamp Posted December 9, 2004 Administrators Posted December 9, 2004 Could you not load the login form 1st, and if the correct credentials are entered then load the main form? Or failing that display the login form with .ShowDialog to prevent access to the main form. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
pendragon Posted December 9, 2004 Posted December 9, 2004 I do the same thing at work. The way I did it was do to as PlausiblyDamp suggests, I set the Login form as the 1st one loaded and after they have logged in hide the login form and do a showdialog for the main menu, when that one closes the login form then closes. this.Hide(); MainMenu LoadMenu = new MainMenu(); LoadMenu.ShowDialog(); this.Close(); [/Code] 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.