Ben McCormack Ben McCormack - 2 years ago 102 Question

How do I make a form modal in Windows Forms?

I'm trying to create a child form that helps the user to enter data for a field in the parent form. I want this child form to be modal, but what do I need to do to make this form modal?

Is there's a different type of item I need to use?

Answer Source

Use Form.ShowDialog()

As Bob mentioned, you should set Form.DialogResult accordingly on your modal form.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download