tags:

views:

42

answers:

2

Hello, I have a window that opens another window. I want that when this window it's opened i can't do anything on the parent window. (I'm not allowed to click buttons for example) How I can do that?

Thanks.

+2  A: 

You want a modal window instead of a modeless window. A modal window means that the parent window is not usable while the child window is open.

You can open a modal window with ShowDialog.

You can open a modeless window with just Show.

Brian R. Bondy
No such method exists.
SLaks
@SLaks: Sorry I meant ShowDialog instead of ShowModal
Brian R. Bondy
+3  A: 

You need to call the ShowDialog method instead of Show to show the second window as a modal dialog.

SLaks
Thanks man, Exactly what I wanted.
Alex
Then you should accept this answer by clicking the hollow check.
SLaks