mardi 7 avril 2015

Check if modeless dialogue is already open in C#, Windows Forms

I would like to open a dialogue box upon clicking a picture, but I also don't want the user to be able to open one if one is already open.


I would also like it to be modeless (they can use the main GUI while the secondary dialogue is still open in the background)



private void pictureBox18_Click(object sender, EventArgs e)
{
ADCs ADCsdiag = new ADCs();
ADCsdiag.Show();
}


In this example, I can open as many ADCsdiag dialogues as I want by clicking the picture. I would like to limit to opening one or no dialogues of this type.


Aucun commentaire:

Enregistrer un commentaire