Quote Originally Posted by Dragokas View Post
Hi, thanks. I already done that. But, it is not very convenient.
See: I need disable it, make my work, then enable it.
If only I could somehow make foreground window to be modal, I don't need any action to do after finishing my work, because main window will be activated automatically as soon as I close foreground (modal) window.

I don't very familiar with API related to windows, so I don't know is it possible at all.
AFAIK there is no Windows function to make a window modal, other than creating a Dialog Box, but that must be done before the window is displayed.

To re-enable the others windows when the "modal" window is closed, you'll have to:

1) Subclass that window
or
2) Test with a timer from your program for that window existence and visibility. The API's are: IsWindow and IsWindowVisible.