توسط این سورس کد می توانید نوار وظیفه را به سه حالت مخفی - شفاف و عادی در بیاورید این سورس کد به سه دکمه نیاز دارد.
Private Declare Function FindWindow _
Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal _
lpWindowName As String) 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 Const WS_EX_LAYERED = &H80000
Private Const LWA_COLORKEY = &H1
Private Const LWA_ALPHA = &H2
Private Declare Function _
SetLayeredWindowAttributes _
Lib "user32.dll" (ByVal hwnd As Long, _
ByVal crKey As Long, ByVal bAlpha _
As Byte, ByVal dwFlags As Long) As Long
Private Declare Function ShowWindow _
Lib "user32" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Dim Handel As Long
Private Sub Command1_Click()
SetWindowLong Handel, -20, WS_EX_LAYERED
SetLayeredWindowAttributes Handel, 0, 255, LWA_ALPHA
ShowWindow Handel, 1
End Sub
Private Sub Command2_Click()
SetWindowLong Handel, -20, WS_EX_LAYERED
SetLayeredWindowAttributes Handel, 0, 127, LWA_ALPHA
ShowWindow Handel, 1
End Sub
Private Sub Command3_Click()
SetWindowLong Handel, -20, WS_EX_LAYERED
SetLayeredWindowAttributes Handel, 0, 255, LWA_ALPHA
ShowWindow Handel, 0
End Sub
Private Sub Form_Load()
Command1.Caption = "نمایش"
Command2.Caption = "شفاف"
Command3.Caption = "مخفی"
SetWindowLong Handel, -20, WS_EX_LAYERED
Handel = FindWindow("Shell_Traywnd", vbNullString)
End Sub