Sign in to follow this  
Followers 0
Luigi

gui full screen, but task bar not hide

3 posts in this topic

Greetings,

I try create a GUI FULL SCREEN in Windows 10, I search many topics, change many Styles and ExStyles, but, always create a GUI, and a Windows task bar is showed.

What I do something wrong?

Someone have a example?

 


Visit my repository

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You want to use the $WS_POPUP style and set the width and height to the desktop dimensions

#include <GUIConstants.au3>

Global $hMain = GUICreate("Example", 600, 400, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SIZEBOX))
Global $btnFullScreen = GUICtrlCreateButton("Fullscreen", 10, 10, 100, 20)
Global $aGuiStyle = GUIGetStyle($hMain) ; Save the default styles

GUISetState(@SW_SHOW, $hMain)

While (True)
    Switch (GUIGetMsg())
        Case $GUI_EVENT_CLOSE
            Exit 0
        Case $btnFullScreen
            Fullscreen()
    EndSwitch
WEnd

Func Fullscreen()
    Local Static $bFullScreen = False

    $bFullScreen = Not $bFullScreen

    Switch ($bFullScreen)
        Case True
            GUISetStyle($WS_POPUP, -1, $hMain)
            WinMove($hMain, "", 0, 0, @DesktopWidth, @DesktopHeight)
        Case False
            GUISetStyle($aGuiStyle[0], -1, $hMain)
            WinMove($hMain, "", 0, 0, 600, 400)
    EndSwitch
EndFunc

 

Edited by InunoTaishou
Forgot to remove an unused include
1 person likes this

Share this post


Link to post
Share on other sites

@InunoTaishou, thank you, it's work.


Visit my repository

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0