Openwindow Question?

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 cor.

How to open a window which is maximized but not overwriting the windows taskbar,
just like the PB editor?

It must be done at several screen resolutions.

640x480
800x600
1024x768



Registered user of PB

C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
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 El_Choni.

Hi. Try this:

Code: Select all

wndpl.WINDOWPLACEMENT
wndpl\Length = SizeOf(WINDOWPLACEMENT)
wndpl\showCmd = #SW_SHOWMAXIMIZED
wndpl\flags = 0; 

If OpenWindow(0, #CW_USEDEFAULT, #CW_USEDEFAULT, #CW_USEDEFAULT, #CW_USEDEFAULT, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget, "Maximized window")

SetWindowPlacement_(WindowID(), @wndpl)

EndIf
Bye,


Edited by - El_Choni on 10 January 2002 13:17:44
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 cor.

It works

great, thanks a lot

Registered user of PB

C. de Visser
Author of Super Guitar Chord Finder
http://www.ready4music.com
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.

An easier way:

OpenWindow(..... bla,bla)
ShowWindow_(WindowID(),#SW_MAXIMIZE)

that's it!

Have a nice day...
Franco

Edited by - franco on 10 January 2002 15:52:17
Post Reply