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,hDC As Dword, deskW,deskH as Long
Function PBMain () As Long
Desktop Get Client To deskW, deskH
Dialog New Pixels, 0, "DeskTop Text",,, 175,100, %WS_OverlappedWindow To hDlg
Dialog Show Modal hDlg, Call DlgProc
End Function
CallBack Function DlgProc() As Long
Local s As String
Select Case Cb.Msg
Case %WM_InitDialog
Dialog Minimize hDlg
SetTimer(Cb.Hndl, %ID_Timer, 250, ByVal %NULL) 'uses callback messages
Case %WM_Timer
s = Time$
hDC = GetDC(%Null)
textout hdc, deskW-150, deskH-50, ByVal StrPtr(s), Len(s)
ReleaseDC(%Null, hDC)
Case %WM_Destroy
RedrawWindow %NULL, ByVal %NULL, ByVal %NULL, %RDW_INVALIDATE Or %RDW_UPDATENOW Or %RDW_ALLCHILDREN
KillTimer Cb.Hndl, %ID_Timer
End Select
End Function
'gbs_01011
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm