Show the window form modally on the other form
I have a window form named form1
and on 开发者_开发技巧that I want to show another window form named form2
modally so that user cannot click on anything else until the form2
is closed but user can select only the textbox displayed on form1
.
use the following code in Form1:
form2.ShowDialog();
I think, it would be better if you use textbox on form2 and use form2.showdialog() in form1
Maybe you can use a modeless form2, and disable all user control in form1 except the Textbox
on form1.
精彩评论