Hello, i have some application (windows form) the first window (Main) is a Mdi. i need when the client open the application the main windows will open and will open new win for username and password but the client need to be Unavilable to minimize or close the login win and not be able to use the menu above in the main Mdi win until he will fill correct username and password. i know how to show the login win and to handle incorrect user/pass but how can i block the main win behaind until the user put correct pass and user?
elidotnet
0
Junior Poster in Training
Recommended Answers
Jump to PostShow the login form first, then if the login is successful, open the MDI form from the login form:
void buttonLogin_Click(object sender, EventArgs e) { string user = textBoxUser.Text; string pass = textBoxPass.Text; if (IsValid(user, pass)) { new MainForm().Show(); Hide(); } else { MessageBox.Show("Invalid user name or …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.