Hi, i'm trying to make a small project that uses multiple forms (dialogs) for different states and ran in a few problems. My dialogs are Login, Settings and Display. When application is started Login form is displayed
Application.Run(new login());
from it the user can open Settings form or, if certain requirements are met, the Display form.
Q1: how do i make Login form unavailable to user when Settings form is opened (i want the user to complete the fields in the Settings form, then click 'save' button to exit, before he can do anything else in Login form)
Q2: how do i hide the Login form when user opens the Display form and show it again when user closes the Display form.
for Q1: i have no ideea, i just thought i could do the same as in Q2.
for Q2: i tried to send the Login form object to the Dispaly form to use ShowDialog() method.
in Login form i hide the form and show the Display form like this:
this.Hide();
Display cat = new Display(ConString, idp, this);
cat.ShowDialog();
in Display form i try to close the dialog on exit and show the Login form like this
private void Display_FormClosed(object sender, FormClosedEventArgs e)
{
this.Close();
this.l.ShowDialog();
}
where l var is the Login object sent to Display constructor, of the type Login. the problem is that Display form is not closing and if user clicks display again a new dialog will show and i want max 1 instance of Display form.
thanks