VB and VBA Users Source Code: Enable and Disable the windows task bar
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Enable and Disable the windows task bar
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Sunday, January 14, 2001
Hits:
594
Category:
Windows API
Article:
The following code disables and enables the windows Task Bar: Option Explicit Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long 'Purpose : Enables/disables the Task Bar 'Inputs : [bEnable] If True enables the Task Bar else disables the Task Bar 'Outputs : Returns zero if disabled Task Bar ' Returns 8 if enabled Task Bar 'Author : Andrew Baker 'Date : 14/01/2001 11:51 'Notes : 'Revisions : Function DisableTaskBar(Optional bEnable As Boolean = False) As Long Dim lTrayHandle As Long lTrayHandle = FindWindow("Shell_TrayWnd", "") DisableTaskBar = EnableWindow(lTrayHandle&, bEnable) End Function
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder