Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
%ID_Timer = 500
Global hDlg As Dword, deskW, deskH As Long
Function PBMain () As Long
Dialog New Pixels, 0, "Timer",,, 350,100, %WS_OverlappedWindow To hDlg
Desktop Get Size To deskW, deskH
Dialog Show Modal hDlg, Call DlgProc
End Function
CallBack Function DlgProc() As Long
Local hWnd As Dword, rc As Rect
Select Case Cb.Msg
Case %WM_InitDialog
SetTimer(Cb.Hndl, %ID_Timer, 500, ByVal %NULL) 'uses callback messages
Case %WM_Timer
hWnd = FindWindow("Shell_TrayWnd", "")
GetWIndowRect hWnd, rc
Dialog Set Text hDlg, IIf$ (rc.nTop > (deskH-10), "hidden", "visible")
Case %WM_Destroy
KillTimer Cb.Hndl, %ID_Timer
End Select
End Function
'gbs_00809
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm