VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Disable the Windows Taskbar

by StonePage (2 Submissions)
Category: Windows System Services
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

Disable the Taskbar

API Declarations
Dim hwnd1 As Long
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

Rate Disable the Windows Taskbar

3. Add a Command Button control to Form1. Command1 is created by
default. Set its Caption property to "Hide".
4. Add the following code to the Click event for Command1.
Private Sub Command1_Click()
hwnd1 = FindWindow("Shell_traywnd", "")
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
End Sub
5. Add a second Command Button control to Form1. Command2 is created by 
default. Set its Caption property to "Show".
6. Add the following code to the Click event for Command2.
Private Sub Command2_Click()
Call SetWindowPos(hwnd1, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
End Sub

Download this snippet    Add to My Saved Code

Disable the Windows Taskbar Comments

No comments have been posted about Disable the Windows Taskbar. Why not be the first to post a comment about Disable the Windows Taskbar.

Post your comment

Subject:
Message:
0/1000 characters