Question second form

andrews

Well-known member
Joined
Nov 22, 2011
Messages
155
Programming Experience
5-10
Hi,
I have a second form in a program called form2.
To see this form I can write in the form1 code : form2.show
But the program do not stop.
To stop the program to see form2 I can add to the code : messagebox.show("I see")
But maybe there is a better way to let disappear (not deleting) the form2 by clicking somewhere without a messagebox.
Thanks for any response
 
I assume that what you're asking for is a way to display a modal dialogue, i.e. the user cannot access Form1 until Form2 is dismissed. To do that, call ShowDialog instead of Show. ShowDialog will not return until the dialogue form is closed.
 
Back
Top