Change the windows wallpaper

September 14, 2008 by admin  
Filed under Visual Basic

This Visual Basic example will allow you to change the desktop wallpaper. Change the yourbitmap.bmp to an image on your system

Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long

Public Const SPI_SETDESKWALLPAPER = 20

Dim lngSuccess As Long
Dim strBitmapImage As String

strBitmapImage = "yourbitmap.bmp"
lngSuccess = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, strBitmapImage, 0)

Related posts:

  1. change windows wallpaper Declare Function SystemParametersInfo Lib “user32″ Alias “SystemParametersInfoA” (ByVal uAction As...
  2. change drive name Private Declare Function SetVolumeLabelA Lib “kernel32″ _ (ByVal lpRootPathName As...
  3. change computer name change computer name using Visual Basic Declare Function SetComputerName Lib...
  4. Associate a file extension with an application Private Declare Function RegCreateKey Lib “advapi32.dll” Alias “RegCreateKeyA” (ByVal hKey...
  5. Change file extensions Public Function ChangeExtension(ByVal FolderName As String, _ ByVal NewExtension As...

Related posts brought to you by Yet Another Related Posts Plugin.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!