Ideas for Desktop Wallpaper using JPEG, TIF, HTML, Etc., vs BMP?  
Author Message
Docpro777





PostPosted: Visual FoxPro General, Ideas for Desktop Wallpaper using JPEG, TIF, HTML, Etc., vs BMP? Top

Hi all; much thanks in advance for any specific or general thoughts on Desktop Wallpaper automation of VFP-9 reports.

Now that report listeners (VFP-9) create TIF files from reports I wonder if peradventure it might be easier to automate Desktop Wallpaper from such reports.

Currently I use bitmaps as allowed by the dll: PCT_DLL.dll (see below). This works but requires akward 'Print Screen' automation

do wallpaper with 'reports\visit\schedmo' && below
FUNCTION wallpaper
LPARAMETERS a,a1,a2,a3,a4
_SCREEN.AlwaysOnTop = .T.
lstate=(_screen.WindowState)
IF EMPTY(a1) or EMPTY(a2) &&etc
lcBuffer=Space(22)+Chr(0)

lWallPaperDimensions=ALLTRIM(Strtran(lcBuffer,Chr(0)))
ELSE
lWallPaperDimensions="50,67,1000,782"
=WritePrivStr("Screen", "WallPaperDimensions",lWallPaperDimensions, CURDIR() + INIFILE)
ENDIF
a1=VAL(LEFT(lWallPaperDimensions,AT(',',lWallPaperDimensions)-1))
a2=VAL(RIGHT(lWallPaperDimensions,LEN(lWallPaperDimensions)-AT(',',lWallPaperDimensions)))
a3=VAL(RIGHT(lWallPaperDimensions,LEN(lWallPaperDimensions)-AT(',',lWallPaperDimensions,2)))
a4=VAL(RIGHT(lWallPaperDimensions,LEN(lWallPaperDimensions)-AT(',',lWallPaperDimensions,3)))
ENDIF
_screen.WindowState= 2
select visit
LOCATE FOR dos =DATE()
report format &a for visit.dos=date()
lcBMPFile ="C:\Schedule.bmp" &&(picture) "C:\temp.bmp" &&SYS(5)+SYS(2003)+"\BITMAPS\temp.bmp" keep on main c:\ for now vs files.
ERASE &lcBMPFile
Declare Integer formtobmpA IN "PCT_DLL.dll" string bmpfilename,integer nX,integer nY,integer nX2,integer nY2
retVal = formtobmpA(lcBMPFile,a1,a2,a3,a4)


_screen.WindowState= lstate
CLEAR


Peradventure, there's a less kludgy way to automatically print VFP-9 reports (and/or HTML files) to the Windows Desktop Again, I GREATLY APPRECIATE any thoughts.



Visual FoxPro2