Page 1 of 1

minimize a window

Posted: Fri Jun 10, 2005 4:51 pm
by PB&J Lover
How do you force a window to minimize when you do something like RUNPROGRAM()?

Thanks

Posted: Fri Jun 10, 2005 5:01 pm
by Hroudtwolf

Code: Select all

RunProgram ("NotePad.exe")
ShowWindow_(GetForegroundWindow_(),#SW_MINIMIZED)

minimizing

Posted: Fri Jun 10, 2005 5:06 pm
by PB&J Lover
I'm getting a "constant not found error."

Which window will that minimize?

The window I want to minimize is the program window that launches the other app. I should have been more clear.

Thanks.

Posted: Fri Jun 10, 2005 5:13 pm
by Hroudtwolf
Sorry.

Use this...

Code: Select all

RunProgram ("NotePad.exe")
ShowWindow_(GetForegroundWindow_(),#SW_SHOWMAXIMIZED	)

minimize

Posted: Fri Jun 10, 2005 5:22 pm
by PB&J Lover
Cool.

I fixed it. It was

ShowWindow_(GetForegroundWindow_(),#SW_SHOWMINIMIZED)

and it works now.

Thanks!

Posted: Fri Jun 10, 2005 5:28 pm
by Hroudtwolf
I fixed it
???

Posted: Fri Jun 10, 2005 5:32 pm
by PB&J Lover
Yes, I wanted to MINIMIZE the window. You first example was missing the SHOW part of the constant.

I wasn't clear, but it works now. Thanks.