c# - Switching between between main and pop-up form -
how can lock (and make faded) parent form while child form active? tried make child form topmost made visible , can still edit parent form. want unable operate on main form while child form running in vs2012, c#. code used call second form...
private void checkbutton_click(object sender, eventargs e) { form2 newform = new form2(this); newform.show(); }
one simple way use showdialog()
instead of show()
on child form. prevent interaction main form. neat way of passing results. there many other ways, of course.
example:
private void checkbutton_click(object sender, eventargs e) { form2 newform = new form2(this); newform.showdialog(); }
see msdn further details: https://msdn.microsoft.com/en-us/library/c7ykbedk(v=vs.110).aspx
Comments
Post a Comment