Reckoner wrote:
> Using Python win32 extensions, how do you make an arbitrary window on
> winXP transparent?

I'll assume you already know how to find the window handle of your
victim window.

The key concept is that you need to set the WS_EX_LAYERED bit in the
extended styles, then set the transparency level using
SetLayeredWindowAttributes.  You can look up both APIs in MSDN for more
detailed information.

    import win32gui
    import win32con
    win32gui.SetWindowLong(handle, win32con.GWL_EXSTYLE,
win32con.WS_EX_LAYERED)
    win32gui.SetLayeredWindowAttributes(handle, 0, 128, win32con.LWA_ALPHA)

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to