0
Only one instance allow in winforms c#
Hello Members, In my windows forms application that have menu strip. I need to make program that only allow one instance. Means from menu if user open Student and need to open another windows systems not allow him. Please help.
3 Antworten
0
You need a program that allow only one instance of what exactly? only one instance of application? or a form?
0
Dear, Let me explain my scenario, I have a form form1 and form2.
In form1 there is Menustrip and option to open Form2. Once Form2 is open, user not allowed to do anything on form1 without closing form2.
0
I get the solution, I need to use ShowDialog() instead of Show();
Like
SybForm f = new SubForm();
f.ShowDialog(this);
Where this is instance of main form.