Скрытие и востановление панели задач

Текст модуля:
 

Option Compare Database
Option Explicit

' скрытие и востановление панели задач
Private Declare Function FindWindow Lib "user32" Alias _
"FindWindowA" (ByVal IpClassName As String, ByVal IpWindowName _
As String) As Long

Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndlnsertAfter As Long, _
ByVal x As Long, ByVal у As Long, ByVal ex As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long

Private Const SWP_HIDEWINDOW = &H80
Private Const SWP_SHOWWINDOW = &H40

Public Function HideTaskBar() As Boolean
Dim IRet As Long

IRet = FindWindow("Shell_traywnd", "")
If IRet > 0 Then

IRet = SetWindowPos(IRet, 0, 0, 0, 0, 0, SWP_HIDEWINDOW)
HideTaskBar = IRet > 0
End If
End Function

Public Function ShowTaskBar() As Boolean
Dim IRet As Long

IRet = FindWindow("Shell_traywnd", "")
If IRet > 0 Then

IRet = SetWindowPos(IRet, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)

ShowTaskBar = IRet > 0
End If
End Function

Обращение к функции:
 

' HideTaskBar
Call HideTaskBar

' ShowTaskBar
Call ShowTaskBar


Страница сайта http://test.interface.ru
Оригинал находится по адресу http://test.interface.ru/home.asp?artId=8174