就想QQ音乐、酷狗和酷我一样,歌词锁住后就好像是印在上面的,我们还能点击它后面的一切东西?这是怎么做到的?求助啊!~!!!

解决方案 »

  1.   


    Option Explicit 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 Const LWA_COLORKEY = &H1 
    Const LWA_ALPHA = &H2 
    Const GWL_EXSTYLE = (-20) 
    Const WS_EX_LAYERED = &H80000 
    Const WS_EX_TRANSPARENT   As Long = &H20& Private Sub Form_Load() 
        Dim Ret   As Long     Ret = GetWindowLong(Me.hWnd, GWL_EXSTYLE) 
        Ret = Ret Or WS_EX_LAYERED Or WS_EX_TRANSPARENT 
        SetWindowLong Me.hWnd, GWL_EXSTYLE, Ret 
        SetLayeredWindowAttributes Me.hWnd, 0, 200, LWA_ALPHA'第三个参数200是设置透明度 0<=x<=255
    End Sub