I have found the code myself using api
if any one like me is in need of same, the code goes something like this
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
Dim TaskBarHwnd As Long
Private Sub Command1_Click()
If Command1.Caption = "Hide" Then
Call SetWindowPos(TaskBarHwnd, 0&, 0&, 0&, 0&, 0&, SWP_HIDEWINDOW)
Command1.Caption = "Show"
Else
Call SetWindowPos(TaskBarHwnd, 0&, 0&, 0&, 0&, 0&, SWP_SHOWWINDOW)
Command1.Caption = "Hide"
End If
End Sub
Private Sub Form_Load()
TaskBarHwnd = FindWindow("Shell_traywnd", "")
End Sub
|