Answer the question
In order to leave comments, you need to log in
How to set different wallpapers on different monitors in Windows?
Hello!
The question is not really about python, but rather about win32 api.
All this on Windows 10 64 bit. Here is the code that sets a random wallpaper on the desktop (everything is shortened, but even in this version it works):
import ctypes
import random
import os
start_path = "D:/_Картинки клиппарды обои"
list_images = os.listdir(start_path)
img_path = os.path.join(start_path, random.choice(list_images))
ctypes.windll.user32.SystemParametersInfoW(20, 0, img_path, 0)
ctypes.windll.???.IDesktopWallpaper.SetWallpaper(1, img_path)
ctypes.windll.???.IDesktopWallpaper.SetWallpaper(2, img_path2)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question