Date: 02-16-2022
Return to Index
created by gbSnippets
ScreenSaver - Template (Uses Graphic Control)
'Primary Code:
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "win32api.inc"
%IDC_Graphic = 500
Global hDlg, hGraphicDC, hDesktopDC As Dword
Function PBMain() As Long
Local w,h As Long
Desktop Get Size To w,h
Dialog New Pixels, 0, "",0,0,w,h, %WS_Popup To hDlg
Control Add Graphic, hDlg, %IDC_Graphic, "", 0,0,w,h,%WS_Visible
Graphic Attach hDlg, %IDC_Graphic
Graphic Get DC To hGraphicDC
hDeskTopDC = GetDC(%Null)
BitBlt hGraphicDC, 0,0,w,h, hDeskTopDC, 0,0, %SRCCopy 'copy desktop image to
ReleaseDC(%Null,hDeskTopDC)
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case CB.Msg
Case %WM_ContextMenu : Dialog End hDlg
End Select
End Function
'gbs_01095
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm