Ctrl & lbutton Gui drag?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
PuzzledGreatly
Posts: 863
Joined: 29 Sep 2013, 22:18

Ctrl & lbutton Gui drag?

02 May 2020, 01:55

I know of this trick by SKAN:

Code: Select all

Gui, +AlwaysOnTop +Border -Caption
Gui, Margin, 20, 20
Gui, font, s50
Gui, add, text, guimove, Move me
Gui, show
return

uiMove:
PostMessage, 0xA1, 2,,, A
Return

Guiescape:
ExitApp
But is there a way to move a gui with ctrl and lbutton? I want to use regular clicking on Gui controls for something else. Thanks.
User avatar
PuzzledGreatly
Posts: 863
Joined: 29 Sep 2013, 22:18

Re: Ctrl & lbutton Gui drag?

02 May 2020, 02:19

I figured it out. I just need to use getkeystate:

Code: Select all

uiMove:

if !getkeystate("control")
return

PostMessage, 0xA1, 2,,, A 
Return

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], JackMa, rpgfreak128, Thorx and 301 guests