Search Tools Links Login

Disable the Windows Taskbar


Disable the Taskbar

Original Author: StonePage

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

Code

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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 84 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.