by gunti (6 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
This shows an easy way, how to hide window's 95/98 Startbar.
API Declarations'copy this in a module:
Dim hwnd1 As Long
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
'this is for the form; ->
Private Sub Command1_Click()
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, &H80)
End Sub
Private Sub Command2_Click()
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, &H40)
End Sub