Тема: AHK : Как сделать так, что бы кнопка не выходила за GUI
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
VarSetCapacity(pt,8)
Gui, +Hwndhgui -Caption +ToolWindow
Gui, Margin,0,0
Gui, Add, Checkbox, w200 h50 , Buttonsa
hParentWnd:=WinActive("A")
DllCall("GetCursorPos","uint",&pt)
DllCall("ScreenToClient","uint",hParentWnd,"uint",&pt)
x = 500
y = 300
DllCall("SetParent","uint",hgui,"uint",hParentWnd)
Gui, Show, x%x% y%y%
return
vk44::
x += 20
Gui, Show, x%x% y%y%
return
vk41::
x -= 20
Gui, Show, x%x% y%y%
return
vk57::
y -= 20
Gui, Show, x%x% y%y%
return
vk53::
y += 20
Gui, Show, x%x% y%y%
return
Как сделать, что бы когда чекбокс упирался в конец окна, он НЕ ВЫХОДИЛ ЗА НЕГО. (Самого гуи в коде нет, но кнопка ВЫХОДИТ ЗА НЕГО.)
(Чуть позже я попробывал вставить гуи, но этот чекбокс становился им и принимал размер гуи.. И крч само окно двигалось, а чекбокса там не было - ХЕЛП)