Paulie Posted October 21, 2006 Share Posted October 21, 2006 (edited) Could somebody please tell me if I am using this .dll correctly to change the desktop wallpaper?It's really confusing me...$i_image1 = "C:\WINDOWS\Web\Wallpaper\Bliss.jpg" (DllCall Removed due to its horribly blatant wrongness)Don't laugh at me if this is horrible :"> , I have no idea how to do this correctlyI got my info from here:http://msdn.microsoft.com/library/default....ametersinfo.asphttp://msdn.microsoft.com/coding4fun/inthe...er/default.aspxSomeone help me figure this out please Edited October 21, 2006 by Paulie Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 21, 2006 Moderators Share Posted October 21, 2006 http://www.autoitscript.com/forum/index.ph...st&p=226095 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GaryFrost Posted October 21, 2006 Share Posted October 21, 2006 Suggest searching for SystemParametersInfo here on the forum, be suprised what you'll find. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
MHz Posted October 21, 2006 Share Posted October 21, 2006 _ChangeWallpaper() by ezzetabihttp://www.autoitscript.com/forum/index.ph...mp;hl=wallpaper Link to comment Share on other sites More sharing options...
Paulie Posted October 21, 2006 Author Share Posted October 21, 2006 (edited) Suggest searching for SystemParametersInfo here on the forum, be suprised what you'll find.Thanks, I found the Dll i needed(I was no where Close! ), however, I really wish to become more acquainted with dlls, so do you think someone could explain to me in layman's terms what this is doing. Just so i have some remote understanding and am not just blindly CnPing? DllCall("user32","int","SystemParametersInfo","int",20,"int",0,"str",$PathToImage,"int",0) Edited October 21, 2006 by Paulie Link to comment Share on other sites More sharing options...
PaulIA Posted October 21, 2006 Share Posted October 21, 2006 ; ================================================================================================= ; Global Constants ; ================================================================================================= Global Const $SPI_SETDESKWALLPAPER = 20 Global Const $SPIF_SENDCHANGE = 2 ; ================================================================================================= ; Main ; ================================================================================================= _SetDesktopWallpaper("C:\Windows\Web\Wallpaper\Bliss.bmp") Exit ; ================================================================================================= ; Description ..: Sets the desktop wallpaper to the BMP file passed in. ; Parameters ...: $sBMPFile - Full path to the BMP file ; $bUpdate - Specifies whether the user profile is to be updated. If True, the ; WM_SETTINGCHANGE message is broadcast to all top level windows to notify them ; of change. ; Return values : True ; False ; ================================================================================================= Func _SetDesktopWallpaper($sBMPFile, $bUpdate=True) Local $aResult Local $iWinIni = 0 if $bUpdate then $iWinIni = $SPIF_SENDCHANGE $aResult = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_SETDESKWALLPAPER, _ "int", 0, "str", $sBMPFile, "int", $iWinIni) Return $aResult[0] <> 0 EndFunc Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now