How to resize GUI control? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

How to resize GUI control?

11 May 2018, 08:55

So I'm making this little app to handily switch between emojis and text styles (mostly for discord). Discord is not a game it's a text based platform (for moderators).

Now the thing is, when I try to use GuiControl to immediately display the border again (they will display only when the user uses his arrow keys), it becomes enormous. How do I resize it's size to how it would have been if I had used the Gui, Add, Picture command (there I set x y width and height, but am not able to or don't know how to do the same with guicontrol)? I am using GuiControl because I want the effect immediately I don't want to destroy the GUI. And this is after the GUI is shown.

I'm clueless. ControlMove didn't work either unless I was doing something wrong, but I have a feeling that is not it.

I tried writing xn yn wn hn after the file path in guicontrol's param 3 but that didn't change anything for the image.

Any leads? Appreciate it!

How it should look:
textmash.png
textmash.png (31.96 KiB) Viewed 1374 times


How it looks:
textma.png
textma.png (43 KiB) Viewed 1376 times


Code:

Code: Select all

Menu, tray, Icon , general\Logo.ico, 1, 1
Gui, New, +AlwaysOnTop -MinimizeBox, TextMash


Gui, Add, Picture, x2 y-1 w70 h70 +BackgroundTrans vBorder1, general\Border.png
Gui, Add, Picture, x72 y-1 w70 h70 +BackgroundTrans vBorder2, general\Border.png
Gui, Add, Picture, x22 y99 w100 h50 +BackgroundTrans vBorder3, general\Border.png
Gui, Add, Picture, x42 y179 w60 h40 +BackgroundTrans vBorder4, general\Border.png

GuiControl, , Border1
GuiControl, , Border2
GuiControl, , Border3
GuiControl, , Border4

; and some other picture adding 

Gui, Show, x478 y186 h220 w147

GuiControl, , Border3, general\Border.png 
; ^^^ Fault
I am your average ahk newbie. Just.. a tat more cute. ;)
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: How to resize GUI control?

13 May 2018, 04:12

Bump, appreciate it, looking for more answers. :)
I am your average ahk newbie. Just.. a tat more cute. ;)
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: How to resize GUI control?  Topic is solved

13 May 2018, 09:43

AHHHHHHHHHHHHHH. Okay for some reason I thought that using Gui, Add' ing a picture would need the GUI to be destroyed in order for the change to be reflected. I donno why I thought that.

But yes just using Gui, add works. lol. Cheers! :D
I am your average ahk newbie. Just.. a tat more cute. ;)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: JPMuir and 328 guests