w0uter Posted July 10, 2005 Share Posted July 10, 2005 Func _SetWallpaper($s_BitmapImage, $l_params = 0) $ai_Ret = DllCall('user32.dll', 'long', 'SystemParametersInfoA', 'long', 20, 'long', 0, 'str', $s_BitmapImage, 'long', $l_params) Return $ai_Ret[0] EndFunc code is using SPI_SETDESKWALLPAPER ( = 20) My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
ryeguy Posted July 11, 2005 Share Posted July 11, 2005 why not just use the registry setting Link to comment Share on other sites More sharing options...
LxP Posted July 11, 2005 Share Posted July 11, 2005 Nice work Wouter! Could you please explain how to set $l_params and possibly share what return values we could expect?why not just use the registry settingBecause this would not immediately update the desktop. Link to comment Share on other sites More sharing options...
blindwig Posted July 11, 2005 Share Posted July 11, 2005 Wow, this will come in handy for a project I was working on a while back. I had a bunch of different computers (all very similiar) and sometimes forgot which one I was looking at. I made a batch file to set the computers name on the desktop, but of course you had to either logout/logon or reboot for it to refresh (because all the batch did was modify a BMP file that was set as the dekstop wallpaper in the registery. Does anyone know how to set the desktop to a JPG or HTML? My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions Link to comment Share on other sites More sharing options...
ezzetabi Posted July 12, 2005 Share Posted July 12, 2005 (edited) The good old seach button...About using non .bmp files the simplest idea is converting them using topng.The basic idea is:1- convert the non .bmp in a bmp with a different name.2- set that bmp as background.3- when you need to change, delete that bmp e restart at point one.So the original file is preserved and only one file at time is in the .bmp format.(This is the soultion 'Run!' uses)Forget about .html since this UDF works only without active desktop. Edited July 12, 2005 by ezzetabi Link to comment Share on other sites More sharing options...
busysignal Posted July 12, 2005 Share Posted July 12, 2005 Nice idea. It would be nice to use other types of graphic formats.. Cheers.. Link to comment Share on other sites More sharing options...
blindwig Posted July 12, 2005 Share Posted July 12, 2005 well it seems that other graphics files can be put it: HKEY_CURRENT_USER\Control Panel\Desktop\ConvertedWallpaper and a HTML file can be put in: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\Wallpaper but there are binary timestamps to go along with them - don't know what those are for. Probaly should do this with a DLL call instead of straight to registry. My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions 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