Jump to content
Sign in to follow this  

Sticky UI

Recommended Posts


Is it posible to sticky the UI to the active window?

I've created a UI that have all the data entry commands as a button and it will be very helpful to have it attached at the bottom of the active window...only if it's posible.

Thanks is advance.

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Share this post

Link to post
Share on other sites

This should get you started, it snaps window to the screens edges :)

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
Opt("GUiOnEventMode", 1)
GUICreate("test", 300, 300)
GUISetOnEvent(-3, "close")
GUIRegisterMsg($WM_MOVE, "moved")
While 1

Func close()
EndFunc   ;==>close

Func moved()
    $pos = WinGetPos("test")
    If $pos[0] < 25 Then WinMove("test", "", 0, $pos[1])
    If $pos[1] < 25 Then WinMove("test", "", $pos[0], 0)
    If $pos[0] + 300 > @DesktopWidth - 25 Then WinMove("test", "", @DesktopWidth - 300, $pos[1])
    If $pos[1] + 300 > @DesktopHeight - 25 Then WinMove("test", "", $pos[0], @DesktopHeight - 300)
EndFunc   ;==>moved

Good Luck! :(

Broken link? PM me and I'll send you the file!

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.