2017-05-10 56 views

回答

1

墨菲定律,我在詢問後立刻找到答案。

win32gui模塊具有設置透明度鍵的功能。

win32gui.SetLayeredWindowAttributes


SetLayeredWindowAttributes(hwnd, Key, Alpha, Flags) 

    Sets the opacity and transparency color key of a layered window. 

Parameters 

    hwnd : PyHANDLE 

     handle to the layered window 

    Key : int 

     Specifies the color key. Use win32api::RGB to generate value. 

    Alpha : int 

     Opacity, in the range 0-255 

    Flags : int 

     Combination of win32con.LWA_* values