VB Code:
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 Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Public Const SWP_HIDEWINDOW = &H80 Public Const SWP_SHOWWINDOW = &H40 ' HIDE Private Sub Command1_Click() hwnd1 = FindWindow("Shell_traywnd", "") Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW) End Sub ' SHOW Private Sub Command2_Click() hwnd1 = FindWindow("Shell_traywnd", "") Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW) End Sub


Reply With Quote