Change Windows Wallpaper


  • The desktop image must be changed


  • Use a low-level Windows hook to set the background

Sample Code

static extern bool SystemParametersInfo(int uiAction, int uiParam, string pvParam, bool fWinIni);
const int SPI_SETDESKWALLPAPER = 0x14;
// in code
// ensure fileName is a bitmap (of the format ImageFormat.Bmp)
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, fileName, true);
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License