Maximize a window?

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by halo.

It's hard to get eh exact size of the window right to fit on the desktop. How do I maximize a window from code, just like as if you clicked in the top-right box and maximized it to the screen.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fweil.

Hello,

Play with this command and attributes ...


OpenWindow(0, 0, 0, getsystemmetrics_(#SM_CXSCREEN), getsystemmetrics_(#SM_CYSCREEN), #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar, "Your full screen window")

Hope this helps you.

Rgrds

Francois Weil
14, rue Douer
F64100 Bayonne
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by halo.

That's not what I asked. You just set the reduced size to the desktop area. The window is still not maximized.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

search the forums, it's probably already here..

ShowWindow_(UseWindow(x), #SW_MAXIMIZE)

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

The problem is that with every PureBasic command you set the size of the client area!
So ResizeWindow(x,y) resizes the client area and OpenWindow(0,0,0,x,y... builds a window with the client area size of x,y.

For now one way to change the size of a Window to the size what you want look at:

viewtopic.php?t=1460

and look at my solution for this problem!
Hope this helps.

@ Fred: What with the Linux Version of PureBasic, do I have to learn the Linux-API to get the things done
The better way would be to have build in commands that do a reliable job on Windows and Linux or Amiga.
Don't you think


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by halo.

Thanks.

Is there any complete official docs? It seems that most answers I get aren't in the help files.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

All API stuffs aren't in the help..

Fred - AlphaSND
Post Reply