How to make only part of the window partially transparent? [WinSet]

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
NorInd
Posts: 43
Joined: 03 May 2020, 04:23

How to make only part of the window partially transparent? [WinSet]

17 Apr 2022, 12:28

I know I can use the command WinSet, Transparent, 175, A to make the window transparent.

But it makes the whole window transparent.
How can I make only part of the window transparent?
eg: Make only the upper part transparent, while the lower part is not.
Last edited by NorInd on 22 Apr 2022, 00:48, edited 1 time in total.
NorInd
Posts: 43
Joined: 03 May 2020, 04:23

Re: How to make only part of the window transparent? [WinSet]

22 Apr 2022, 00:43

I know this Region command, (I am using this only as a temporary solution) but it makes the window (the part outside the Region) totally invisible -- ie: alpah = 0;
But how can I make that part only partially transparent -- ie: alpah = 175?

//fix wording
//fix wording
Last edited by NorInd on 22 Apr 2022, 03:04, edited 1 time in total.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: How to make only part of the window partially transparent? [WinSet]

22 Apr 2022, 02:08

Using 'WinSet, Transparent' beforehand/afterwards?
NorInd
Posts: 43
Joined: 03 May 2020, 04:23

Re: How to make only part of the window partially transparent? [WinSet]

22 Apr 2022, 02:59

BoBo wrote:
22 Apr 2022, 02:08
Using 'WinSet, Transparent' beforehand/afterwards?
Em, I am not sure what you mean.
Do you mean somehow combine Transparent & Region?

Are you able to provide an example with codes?
Say, I want to set: the upper part of the window to alpha = 175, the lower part to be alpha = 135.

The work around I am using is this, which doesnt set part of the window, but the whole window with a transparency.

Code: Select all

    WinSet, Transparent, 135, A
    xpos := 40
    ypos := 482
    width := 800
    height := 240
    WinSet, Region, %xpos%-%ypos% W%width% H%height%, ahk_exe notepad++.exe

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 173 guests