Reputation: 9945
Using AutoHotkey, I am trying to create a window which is semi transparent.
Here is the code I have so far:
WinTitle := "mywin"
Gui, New, , %WinTitle%
Gui, Color, 0x000000,
WinSet, Transparent, 150, %WinTitle% ; THIS NEEDS FIXING?
w := A_ScreenWidth/4
h := A_ScreenHeight/4
Gui, Show, x100 y100 w%w% h%h%
This does create a black window, but it is not semi transparent. Any help would be appreciated.
Upvotes: 0
Views: 674
Reputation: 6499
The window doesn't exist before you show it.
So, you have to set the transparency after you show the window.
Gui, +hwnd_hwnd
Gui, Color, 0x000000
w := A_ScreenWidth / 4
h := A_ScreenHeight / 4
Gui, Show, % "x100 y100 w" w " h" h
WinSet, Transparent, 150, % "ahk_id " _hwnd
Misc improvements:
Gui, New
.+hwnd
(docs) option.Upvotes: 1