| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
windows-Wallpapers exchange
executable ex Profan-Version 5.0
PRFellow - Presentation
Author: Thomas Hölzer
Hintergrundbitmap for Desktop loading/take on/delete
example for usage of SystemParametersInfo
Parameter 1: must 20 his for The BMP-function
Parameter 2: must 0 his
Parameter 3: Pointer on String, the whom names the BMP contains
Parameter 4: $0003: entry becomes stored and entspr. Message gesendet
Return : mismatched 0 with success
Declare pointer#
Def SetWallPaper(4) !USER32,SystemParametersInfoA
Image and Anzeigemodus settle
Proc SetWPBmp
Parameters file$,tiled%
Dim pointer#,256
String pointer#,0=file$
SetWallPaper(20,0,pointer#,$0003)
Dispose pointer#
WriteIni HKEY_1,Control Paneldesktop,WallPaper = file$
so GEHTS of course too, but SystemParametersInfo is the better lane,
especially since one it for SPI_SETWININICHANGE eh need
WriteIni HKEY_1,Control Paneldesktop,TileWallpaper = Str $(tiled%)
SetWallPaper(20,0,0,2) SPI_SENDWININICHANGE
ENDPROC
Wallpapers stretchen
Proc SetWPStyle
Parameters style%
WriteIni HKEY_1,Control Paneldesktop,WallPaperStyle = Str $(style%)
SetWallPaper(20,0,0,2)
ENDPROC
example
Declare bmp$,end%
Window Title Wallpapers settle
Window 100,100-250,250
Pop &Wallpapers
AppendMenu 1, &BMP as Desktophintergrund (Centered)
AppendMenu 2, B&MP as Desktophintergrund (tiled)
Separator
AppendMenu 3, Wallpapers on &filled Bildschirmgröße stretchen
AppendMenu 4, &Standardgröße
Separator
AppendMenu 5,&Hintergrundbmp Remove
Separator
AppendMenu 6,&terminate
WhileNot end%
IF Len(bmp$)
LoadSizedBmp bmp$,0,0-250,250;0
ENDIF
WaitInput
If MenuItem(1)
Let bmp$=LoadFile $(Hintergrundbmp for Desktop,*.bmp)
SetWPBmp bmp$,0
ElseIf MenuItem(2)
Let bmp$=Loadfile$(Hintergrundbmp for Desktop,*.bmp)
SetWPBmp bmp$,1
ElseIf MenuItem(3)
SetWPStyle 2
ElseIf MenuItem(4)
SetWPStyle 0
ElseIf MenuItem(5)
SetWPBmp ,0
Let bmp$=
Cls
Elseif MenuItem(6)
Let end%=1
Elseif MenuItem(254)
MessageBox(Author: Thomas Hölzer,PRFellow-Presentation,64)
EndIf
Wend
End
|
|
|
| |
|
|