Jump to content

gui full screen, but task bar not hide


Luigi
 Share

Recommended Posts

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...