WIN2K: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 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 LongPrivate Sub TraningForm(s As Integer)
Dim LRtn As Long
LRtn = GetWindowLong(hwnd, GWL_EXSTYLE)
LRtn = LRtn Or &H80000
SetWindowLong hwnd, (-20), LRtn
SetLayeredWindowAttributes hwnd, 0, s, &H2
End SubPrivate Sub Form_Load()
Call TraningForm(Int(80))
End Sub

解决方案 »

  1.   

    给我Mail,给你一个98下透明的例子
      

  2.   

    [email protected]
    [email protected]
      

  3.   

    win2000Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
    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 Sub TraningForm(s As Integer)
    Dim LRtn As Long
    LRtn = GetWindowLong(hwnd, GWL_EXSTYLE)
    LRtn = LRtn Or &H80000
    SetWindowLong hwnd, (-20), LRtn
    SetLayeredWindowAttributes hwnd, 0, s, &H2
    End Sub
    Private Sub Form_Load()
    Call TraningForm(Int(80))
    End Sub
      

  4.   

    junwhj()  你在哪里抄的
      

  5.   

    junwhj()  用别人的 要指明出处