這是我做了好久的下雪代碼供大家參考
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal sx As Long) As LongPrivate Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal item As Long, ByVal z As Long) As Long
Private Declare Function FindWindowA Lib "user32" (ByVal a As String, ByVal b As Long) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hwnd As Long, ByVal tm As Long, ByVal c As Long, ByVal d As Long) As Long
Private Sub Form_Activate()
Picture1.Top = 0
Picture1.Left = 0
Picture1.Width = Me.Width
Picture1.Height = Me.Height
Picture1.Picture = LoadPicture(App.Path & "\07210edddcc067385982ddf0.jpg")
End Sub
Private Sub Form_Load()
Dim i As Long
Move 0, 0
i = GetWindowLongA(hwnd, -20)
i = i Or 32 Or 800000
SetWindowLongA hwnd, -20, i
SetLayeredWindowAttributes hwnd, 0, 120, 2
i = FindWindowA("ProgMan", 0)
SetParent hwnd, i
i = GetWindow(i, 5)
End Sub