Date: 02-16-2022
Return to Index
created by gbSnippets
'Credit Semem Matusovski http://www.powerbasic.com/support/pbforums/showthread.php?t=22744&highlight=Shell_TrayWnd
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Register None
#Dim All
%Unicode=1
#Include "Win32Api.Inc"
%TASKBAR_MIN_ALL = 419
%TASKBAR_MIN_ALL_UNDO = 416
%TASKBAR_HIDE = 128
%TASKBAR_UNHIDE = 64
Function PBMain
TaskBar %TASKBAR_HIDE: Sleep 2000
TaskBar %TASKBAR_UNHIDE: Sleep 2000
TaskBar %TASKBAR_MIN_ALL : Sleep 2000
TaskBar %TASKBAR_MIN_ALL_UNDO : Sleep 2000
End Function
Sub Taskbar(Op As Long)
Dim hWnd As Long
hWnd = FindWindow("Shell_TrayWnd", "")
If hWnd > 0 Then
Select Case Op
Case %TASKBAR_HIDE, %TASKBAR_UNHIDE
SetWindowPos hWnd, 0, 0, 0, 0, 0, Op
Case %TASKBAR_MIN_ALL, %TASKBAR_MIN_ALL_UNDO
SendMessage hWnd, %WM_Command, Op, 0
End Select
End If
End Sub
'gbs_00810
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm