Const LWA_COLORKEY = &H1

Const LWA_ALPHA = &H2

Const GWL_EXSTYLE = (-20)

Const WS_EX_LAYERED = &H80000

Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long

Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long

Private Sub Form_Load()

    Dim Ret     As Long

          Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE)

          Ret = Ret Or WS_EX_LAYERED

          SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret

          SetLayeredWindowAttributes Me.hWnd, 0, 200, LWA_ALPHA

  End Sub

 

 

from : 網路



arrow
arrow
    全站熱搜
    創作者介紹
    創作者 gordenhao 的頭像
    gordenhao

    高登

    gordenhao 發表在 痞客邦 留言(0) 人氣()