There is a list with data. Clicking 2 times opens the form with this detailed data. There is an identification code or series. It is necessary to prohibit the opening of the form on the identification code if it is already open.
Is it possible?
Just blocking the opening is not good, because This may be misunderstood by the end user and will increase the number of calls to tech support.
In any case, you will need to somehow identify with what data the form / window / controll is open. To do this, add a public property in which the identifier will be returned for identification.
Then you can use this option:
Maybe!
The principle is simple, you need a static Bul, when you open the desired window, you check its state, if false make it true and open the form, well, if it is True then print the message, and when you close the form, you do it back to false .
I hope it is clear that true - means the form is open and false - the form is closed.
We define the global variable list where we will save the code when opening the form and when closing close the code from there.
internal static class GlobabalModule { public static List<string> CodeList { get; set; } public static void InitList() { CodeList = new List<string>(); } } Source: https://ru.stackoverflow.com/questions/755484/
All Articles
formDetails.ShowDialog();? - Alias