Jump to content
Sign in to follow this  
onestcoder

Auto Hide toolbar

Recommended Posts

onestcoder

I wanted to see if it would work and I thought it was a good example of the @SW_SHOW and @SW_HIDE.

When it loads the GUI is hidden. When you move your mouse to the left side of the screen the GUI appears allowing you to use it. If you move your mouse off of the GUI it then disappears again.

#include <GUIConstantsEx.au3>

$Form1 = GUICreate("Form1", 1, 1, 1, 1)
GUISetState(@SW_HIDE)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    
    Sleep(100)
    $pos = MouseGetPos()
    If $pos[0] > 200 Then
        GUISetState(@SW_HIDE)
    ElseIf $pos[0] < 10 And $pos[1] < 600 Then
        GUISetState(@SW_SHOW)
        WinMove("Form1", "", 0, 0, 200, 600)
    EndIf

WEnd

Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites
gseller

GROOVY! I like it. Thanks

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.