PDA

Click to See Complete Forum and Search --> : minimizing another application


noble
Jan 23rd, 2001, 10:37 AM
If you have the handle of a parent window, can you
minimize, hide, and maxmize the application?

I tried using SendMessage to do it but it did not work.

Any suggestions anyone?

Jan 23rd, 2001, 10:51 AM
Use the ShowWindow API function.


Private Const SW_HIDE = 0
Private Const SW_MAXIMIZE = 3
Private Const SW_MINIMIZE = 6
Private Const SW_RESTORE = 9
Private Const SW_SHOW = 5
Private Const SW_SHOWMAXIMIZED = 3
Private Const SW_SHOWMINIMIZED = 2
Private Const SW_SHOWMINNOACTIVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_SHOWNOACTIVATE = 4
Private Const SW_SHOWNORMAL = 1


'Hide
ShowWindow hWnd, SW_HIDE

'Minimize
ShowWindow hWnd, SW_MINIMIZE

'Maximize
ShowWindow hWnd, SW_MAXIMIZE

noble
Jan 24th, 2001, 06:32 AM
thank you,

works great