Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Window Transparancy
#1
I am curious if there is an easy way to get a window's current opacity value.
Additionally, is there an easy way to window restore as a trigger?

I have a function now that fades a window from 255 - 0 opacity rather quickly, then minimizes, then resets opacity to 255 (trigger = left click on min button)
I would like an additional function that would allow me to leave the window at 0 opacity, and restore opacity to 255 over time when restored.
Thanks!
#2
This is what I use to get a window's current opacity or "alpha":
Code:
Copy      Help
int alpha
GetLayeredWindowAttributes hwnd &col &alpha &flags
May also want to include:
Code:
Copy      Help
if(alpha=0) alpha=254
#3
RE: your trigger, how do you expect to restore a totally transparent window?
#4
Thanks for the code! By restore, I mean the action of clicking the window in the taskbar, then having it slowly appear into its pre-mimimized position the screen.
#5
This is the only way I can figure. It works well on my Vista machine.
Trigger:
Code:
Copy      Help
$a 8 0 "" "ToolbarWindow32" 0 "Running Applications" "Shell_TrayWnd" "" 9 "" "Running Applications"
Macro:
Code:
Copy      Help
Acc a=acc(mouse)
out a.Name
int hwnd=win(a.Name "" "" 4)
if(IsIconic(hwnd)) Transparent(hwnd 254)
#6
Thanks a ton, I really appreciate your help.


Forum Jump:


Users browsing this thread: 1 Guest(s)