1

I have seen examples from stack overflow but I am unable to set background of my windows 10 desktop also when I run that program my background changes to black can anyone tell how to set background using python3.6 or tell me what is the error in my code

import ctypes
SPI_SETDESKWALLPAPER = 20
ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, 'image.jpg', 3)
Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251
Saksham Kushwaha
  • 274
  • 1
  • 18

1 Answers1

2
import ctypes

ctypes.windll.user32.SystemParametersInfoW(20, 0, "c:\\path\\to\\image.jpg" , 0)
Abhijeet Gupta
  • 124
  • 1
  • 10