Howto hide window hide titlebar
Howto hide window hide titlebar
Is there somehow possible to make window borderless and back again after creating window?
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Howto hide window hide titlebar
If you're on Windows it's straightforward enough. On other OS's, I don't know how. Natively it isn't possible.
Code: Select all
OpenWindow(0,0,0,640,480,"",#PB_Window_ScreenCentered|#PB_Window_BorderLess)
AddWindowTimer(0,1,2000)
Repeat
ev=WaitWindowEvent()
Select ev
Case #PB_Event_Timer
If EventTimer()=1
SetWindowLongPtr_(WindowID(0),#GWL_STYLE, GetWindowLongPtr_(WindowID(0),#GWL_STYLE) | #WS_CAPTION|#WS_BORDER|#WS_SYSMENU)
SetWindowPos_(WindowID(0),0,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE|#SWP_NOZORDER|#SWP_FRAMECHANGED)
EndIf
EndSelect
Until ev=#PB_Event_CloseWindow
BERESHEIT
Re: Howto hide window hide titlebar
F11 for Border - Borderless
Well,NM posted some fine code faster than me
Code: Select all
OpenWindow(0,0,0,400,300,"Test",#PB_Window_SystemMenu| #PB_Window_ScreenCentered|#PB_Window_SizeGadget)
SetWindowColor(0,#Gray)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Quit = 1
Case #PB_Event_Gadget
Select EventGadget()
Case 1
EndSelect
Case #WM_KEYDOWN
Run ! 1
If Run = 1 And EventwParam() = 122
SetWindowLongPtr_(WindowID(0), #GWL_STYLE, GetWindowLongPtr_(WindowID(0), #GWL_STYLE)&~ #WS_THICKFRAME &~ #WS_DLGFRAME)
ElseIf Run = 0 And EventwParam() = 122
SetWindowLongPtr_(WindowID(0), #GWL_STYLE, GetWindowLongPtr_(WindowID(0), #GWL_STYLE)|#WS_DLGFRAME)
EndIf
Case #WM_LBUTTONDOWN
If Run = 1
SendMessage_(WindowID(0), #WM_NCLBUTTONDOWN, #HTCAPTION, 0)
EndIf
EndSelect
Until Quit = 1
End
Egypt my love
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Howto hide window hide titlebar
For a change!Well,NM posted some fine code faster than me


BERESHEIT
Re: Howto hide window hide titlebar
Happy new year NM
I am glad that you are still here
I am glad that you are still here
Egypt my love
Re: Howto hide window hide titlebar
Thanks to all