Hey, is there a way to add transparent elements to a GUI in a way that their transparency is controllable?
Like this: i.imgur.com/f6t51yz.jpg
Is GDIP the only way? My theory is, that if this can't be done with AHK only, there would be a separate GDIP layer needed that would move with the AHK window... but this seems to be really cumbersome for a very simple thing. Is there a better way?
Control transparency of elements on a GUI Topic is solved
-
- Posts: 9
- Joined: 03 Nov 2015, 17:59
Re: Control transparency of elements on a GUI Topic is solved
You can use WinSet, Transparent
Code: Select all
Gui, Add, Picture, HWNDhPic, % A_AhkPath
Gui, Add, Slider, w300 Range0-255 ToolTip vTransVal gChangeTransparency, 255
Gui, Show
Return
ChangeTransparency:
GuiControlGet, TransVal
WinSet, Transparent, %TransVal%, ahk_id %hPic%
Return
GuiClose:
ExitApp
-
- Posts: 9
- Joined: 03 Nov 2015, 17:59
Re: Control transparency of elements on a GUI
Ooooh thanks, I always thought WinSet commands can only just affect the whole window
Re: Control transparency of elements on a GUI
FYI, this use of WinSet requires Win 8+.