Page 1 of 1

Why can't I minimize this code ?

Posted: Mon Jul 16, 2007 10:00 pm
by TheCorporation
Please why can't I minimize this window ? (I want my software to start minimized).

If OpenWindow(0, 0, 0, #h, #w, "name", #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_Minimize )
...

Posted: Mon Jul 16, 2007 10:07 pm
by Henrik
hi TheCorporation
Look up SetWindowState(#Window, State) in the help file :wink:

Best Henrik

Posted: Mon Jul 16, 2007 10:11 pm
by srod
According to the help manual the #PB_Window_Minimize flag should set the window to a minimized state directly from the OpenWindow() command. Reckon the help manual must be in error rather than Purebasic.

Anyhow the following will have the desired effect:

Code: Select all

If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget| #PB_Window_Invisible )
SetWindowState(0, #PB_Window_Minimize) 

Posted: Mon Jul 16, 2007 10:16 pm
by TheCorporation
Great it works thanks.

(I'm a fan of your avatar !... Doh !).

Posted: Mon Jul 16, 2007 10:50 pm
by srod
What do you mean my avatar? That photo of me was taken only last week!

Doh!

:)

Posted: Tue Jul 17, 2007 1:48 am
by freak
It was just a bug introduced by fixing another windows related problem.
Its fixed for the next release.