Hiding the Win95 System Tray from VB3
Now You See It ; Now You Don't...
' In declarations
Declare Sub SetWindowPos Lib "User" (ByVal hWnd As Integer, ByVal hWndInsertAfter As Integer,_
ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer,_
ByVal cy As Integer, ByVal wFlags As Integer)
Declare Function FindWindow Lib "User" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Integer
Dim trayhwnd As Integer
Sub Command1_Click () ' Hides the Tray
trayhwnd = FindWindow("Shell_traywnd", ByVal 0&)
Call SetWindowPos(trayhwnd, 0, 0, 0, 0, 0, &H80)
End Sub
Sub Command2_Click () ' Shows the tray
Call SetWindowPos(trayhwnd, 0, 0, 0, 0, 0, &H40)
End Sub
![]()