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.
Maximize a window?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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
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

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

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

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
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.
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

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

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm