Why can't I minimize this code ?

Just starting out? Need help? Post your questions and find answers here.
TheCorporation
User
User
Posts: 11
Joined: Fri Sep 15, 2006 8:04 am
Location: FR

Why can't I minimize this code ?

Post 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 )
...
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Post by Henrik »

hi TheCorporation
Look up SetWindowState(#Window, State) in the help file :wink:

Best Henrik
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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) 
I may look like a mule, but I'm not a complete ass.
TheCorporation
User
User
Posts: 11
Joined: Fri Sep 15, 2006 8:04 am
Location: FR

Post by TheCorporation »

Great it works thanks.

(I'm a fan of your avatar !... Doh !).
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

What do you mean my avatar? That photo of me was taken only last week!

Doh!

:)
I may look like a mule, but I'm not a complete ass.
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

It was just a bug introduced by fixing another windows related problem.
Its fixed for the next release.
quidquid Latine dictum sit altum videtur
Post Reply