Jump to content



Recommended Posts

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]

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

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 setting

Because this would not immediately update the desktop.
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by ezzetabi
Link to comment
Share on other sites

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.

Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...