Setwindowfullscreen (window, state)
Setwindowfullscreen (window, state)
A system to set a window to full screen and going back to normal state. Currently we can have fullscreen using borderless style but we can't go back.
Re: Setwindowfullscreen (window, state)
Have u tried these:
Code: Select all
SetWindowState(Window,#PB_Window_Maximize)
SetWindowState(Window,#PB_Window_Normal)
Re: Setwindowfullscreen (window, state)
No, fullscreen means covering the whole desktop including the taskbar the window has not title or borders either. A lot of programs have this option, if you use Internet explorer hit F11.
So we need #PB_Window_Fullscreen flag for SetWindowState().
So we need #PB_Window_Fullscreen flag for SetWindowState().
Re: Setwindowfullscreen (window, state)
Like this?
Code: Select all
If OpenWindow(#Null,#Null,#Null,#Null,#Null,#Null$,#PB_Window_BorderLess)
SetWindowState(#Null,#PB_Window_Maximize)
StickyWindow(#Null,#True)
If ButtonGadget(1,10,10,30,30,"X")
Repeat:Until WaitWindowEvent() = #PB_Event_Gadget
EndIf
EndIf
Re: Setwindowfullscreen (window, state)
But like i said in my first post the point is being able to toggle between normal and fullscreen.
Re: Setwindowfullscreen (window, state)
So this is not an option?
Code: Select all
Procedure FullScreen(Window.i,Toggle.b)
StickyWindow(Window,Toggle)
If Toggle
SetWindowState(Window,#PB_Window_Maximize)
Else
SetWindowState(Window,#PB_Window_Normal)
EndIf
EndProcedure
Flag = #True
If OpenWindow(#Null,#Null,#Null,400,400,#Null$,#PB_Window_BorderLess)
SetWindowState(#Null,#PB_Window_Maximize)
StickyWindow(#Null,#True)
If ButtonGadget(1,10,10,30,30,"X") And ButtonGadget(2,10,50,80,30,"TOGGLE")
Repeat
If WaitWindowEvent() = #PB_Event_Gadget
Select EventGadget()
Case 2
If Flag
Flag = #False
Else
flag = #True
EndIf
FullScreen(#Null,Flag)
Case 1
Break
EndSelect
EndIf
ForEver
EndIf
EndIf
Re: Setwindowfullscreen (window, state)
That doesn't toggle the Borderless flag, which was mentioned in the first post.
It's definitely possible with Windows API, I think you toggle the #GWL_STYLE bits, but I'll leave that to someone better with API.
Also, I would NOT set StickyWindow... try F11 fullscreen in Firefox, Chrome, etc., they do not sticky the window on top.
It's definitely possible with Windows API, I think you toggle the #GWL_STYLE bits, but I'll leave that to someone better with API.
Also, I would NOT set StickyWindow... try F11 fullscreen in Firefox, Chrome, etc., they do not sticky the window on top.