David Gard
David Gard

Reputation: 12047

How do you make the open form the only one that is selectable?

How do I make it so that a VB.net form that is opened from another form (say a settings form) is the only one that can be selected?

I'm using Visual Studio 2012, and I can't see any obvious tools for this, but I'm not sure what I'm looking for. I have tried various possibilities like TopMost = True, but that is not quite it. Thanks.

Upvotes: 1

Views: 714

Answers (1)

sloth
sloth

Reputation: 101122

Just use ShowDialog instead of Show to open the new form.

This will open the form as a modal dialog, and while it is open, no other form can be selected by the user.

Upvotes: 3

Related Questions