Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Gurus*
Posted

Private Const SPI_SETDESKWALLPAPER As Integer = 20
Private Const SPIF_UPDATEINIFILE As Integer = &H1
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, "C:\bitmap.bmp", SPIF_UPDATEINIFILE)

You will need to declare SystemParametersInfo first, of course.

Posted

I saw that online except it was more complicated:

public class User32dll
	{
		[DllImport("user32.dll", CharSet=CharSet.Auto)]
		public static  extern int SystemParametersInfo (int action , int param , string path , int hex) ;
	}

The call: (bmps is a string array of pictures)

User32dll.SystemParametersInfo(20, 0, bmps[tick], 0);

Instead of 0 they had 0x1 | 0x2 as the last param.

 

My question is, what does all of that mean? The 1st, 2nd and 4th param, that is.

C#
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...