OpenWindow & Maximized state.

Windows specific forum
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

OpenWindow & Maximized state.

Post by Thunder93 »

I'm noticing something strange with OpenWindow() with PureBasic 5.44LTS, not sure if it's specific to this release or not.

When I use the flag #PB_Window_Maximize to have it open in Maximized state, it'll cover / Hide Windows Taskbar. I have to specify #PB_Window_MaximizeGadget flag to have it work properly, to have the window maximized and yet still have Windows Taskbar showing.

Is the #PB_Window_MaximizeGadget flag suppose to be an requirement to have PB coded apps to have proper maximized state without the Windows Taskbar being covered up, hidden behind?

If this is by design, could the PB document mention these two maximized screen states and the requirement of #PB_Window_MinimizeGadget flag to have a normal maximum state? Thanks :shock:

Code: Select all

; If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_Maximize|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget) ; Maximized, Taskbar present.
If OpenWindow(0, 100, 200, 195, 260, "PureBasic Window", #PB_Window_Maximize|#PB_Window_MinimizeGadget)   ; Covers / Hides Windows Taskbar
    
  Repeat
    Event = WaitWindowEvent()

    If Event = #PB_Event_CloseWindow 
      Quit = 1
    EndIf

  Until Quit = 1
  
EndIf

End
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Fred
Administrator
Administrator
Posts: 16616
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: OpenWindow & Maximized state.

Post by Fred »

It's not a bug but a a standard Windows behaviour.
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: OpenWindow & Maximized state.

Post by Thunder93 »

Thanks Frederic for the comment.

You know what bugs are, so I'm not questioning. I just thought using #PB_Window_Maximize flag with OpenWindow() it would open window in maximum state in a standardized way. Which in Windows if the Windows Taskbar isn't configured to automatically hide. Maximized Window sits on and doesn't exceed over the Windows Taskbar that isn't set to automatically hide.

Because #PB_Window_MaximizeGadget flag is requirement to have OpenWindow() create maximized window in a standardized way, It should have been noted in the PureBasic Help.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
Roger Hågensen
User
User
Posts: 47
Joined: Wed Mar 25, 2015 1:06 pm
Location: Norway

Re: OpenWindow & Maximized state.

Post by Roger Hågensen »

A maximized borderless window causes Windows to treat it as a non-exclusive fullscreen window. I do not recall when Windows started doing it but it's been around for as long as I can recall. Possibly before Windows XP (might even go all the way back to Windows 95).




(I'm using the terms non-exclusive and exclusive to distinguish this and non-windowed fullscreen that many games use, which could be considered exclusive fullscreen).
4 music albums under CC BY license available for free (any use, even commercial) at Skuldwyrm.no
Post Reply