Sign in to follow this  
Followers 0
jaehyunb

wallpaper

2 posts in this topic

how do i set wallpaper to C:\picture.bmp using "tilt" ?

Share this post


Link to post
Share on other sites



Try this Wallpaper changer.

; Courtesy of ezzetabi.
; The BMP Wallpaperchanger Function.

; Example usage.
_ChangeWallpaper('C:\picture.bmp', 1)


Func _ChangeWallpaper($sFile, $iType)
   ; $iType: 1 = Tiled, 2 = Normal size, 3 = Stretched.
    If Not FileExists($sFile) Then Return 0
    If StringTrimLeft($sFile, StringInStr($sFile, '.', 0, -1)) <> 'bmp' Then Return 0
    Select
        Case $iType = 1
            RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '1')
            RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0')
        Case $iType = 2
            RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '0')
            RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0')
        Case $iType = 3
            RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '0')
            RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '2')
    EndSelect
    RegWrite('HKCU\Control Panel\Desktop', 'Wallpaper', 'reg_sz', $sFile)
    DllCall("user32", "int", "SystemParametersInfo", "int", 20, "int", 0, "str", $sFile, "int", 0)
    Return 1
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0