Position another gui below the button
Posted: 23 Jun 2019, 13:15
Sorry, I struggle with this... I try to show another gui exactly below the button but whatever I do the position is not correct... What am I doing wrong? I need it to work on both, normal and 4K monitors.
Code: Select all
DPf:=A_ScreenDPI/96
gui, add, button, w80 h30 vMyButton gOpen, Button
gui, show, w200 h200
return
Open:
WinGetPos, x, y,,, A
GuiControlGet, Pos, Pos, MyButton
Xpos:=PosX + x
Ypos:=PosY + PosH + y
gui, 2:-caption
gui, 2:margin, 0, 0
gui, 2:add, edit, w100 h100
gui, 2:show, x%Xpos% y%Ypos% w100 h100
return