Silverfrost Forums

Welcome to our forums

Minimise an open Window

30 Dec 2015 11:13 #17098

I would like to programmatically minimise a window I have created. I do not see any specific function to do this.

Is there one, or will I have to use WiN32API calls to accomplish that?

I'm looking to minimise the status window that opens for you automatically when the WINAPP starts. I have created the window , but putting [minimise] as a %ww option doesn't cause the window to be minimised from the start.

I already have a handle to the window.

31 Dec 2015 9:10 #17099

Try calling ShowWindow(hwnd, SW_SHOWMINIMIZED) with SW_SHOWMINIMIZED = 2. The interface for ShowWindow can be found for example in WIN32API.INS.

31 Dec 2015 12:39 #17100

... and probably the call needs to go into the callback for %sc so that the window is fully formed before it is minimsed.

31 Dec 2015 3:05 #17101

Thanks, Paul! This was what I was looking for.

Eddie, the callback via %sc was not needed. That said, I will keep it in mind if I run into some asynchronicity issues.

Bill

Please login to reply.