How to make Main Window Modal?

  • Thread starter Thread starter Phill
  • Start date Start date
P

Phill

I'd like the startup Windows Form to be Modal.

Here's why:

I'm working on a website that has links to .NET apps. So when the user
clicks on these links they can run the apps locally. Ideally I'd like
to have these apps be children of the IE browser that launched them
and have them be modal so they have to close one app before launching
another.

Is this possible?

Thanks.
 
Child window to IE is not possible, although, you can open a popup IE window
for your application. And for windows form to be modal, use
MyForm myForm = new MyForm();
myForm.ShowDialog();

Good Luck !
 
The problem is ShowDialog() won't create a modal window for the first
form window you create. IE form1 displayed that way will not be modal
to the desktop which is my problem.

Also when I explicitly call ShowDialog() for my main Windows Form I
end up w/ 2 forms. One shows up after the 1st closes.

Do you know what is automatically making the form show w/o calling any
show methods?

Thanks for the help.
 
Back
Top