Harikrishna
Harikrishna

Reputation: 4305

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.

Upvotes: 1

Views: 185

Answers (3)

Benny
Benny

Reputation: 8815

Maybe you can use a modeless form2, and disable all user control in form1 except the Textbox on form1.

Upvotes: 0

Brij
Brij

Reputation: 6122

I think, it would be better if you use textbox on form2 and use form2.showdialog() in form1

Upvotes: 0

Webleeuw
Webleeuw

Reputation: 7282

use the following code in Form1:

form2.ShowDialog();

Upvotes: 1

Related Questions