I\'m working on a project and i need some implementention ideas. So far i used windows forms. The application will be used by different users on the same pc. I\'m not a good rel
You can add this to your Main starting point. Basically, you need to be able to loop through the process again once the user gets passed the login form:
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
DialogResult running = DialogResult.OK;
while (running == DialogResult.OK) {
form_login login = new form_login();
Application.Run(login);
running = login.DialogResult;
if (login.DialogResult == DialogResult.OK)
Application.Run(new Form1());
// or your other forms...
}
}
This is assuming your login form has an OK and a Cancel button that sets those dialog results.
If the login works, then it launches the main form, Form1. When the user closes Form1, it starts the Login form again. If the user cancels the login, the application is exited.