ctypes ques

R

ryan

the win32 python extentions don't seem to have "SysParametersInfo()" and i need it to set the wallpaper in windows.

cyptes has a "SysParametersInfoA()" function but wont let me use the SPI_SETDESKWALLPAPER attribute.

anyone have any ideas how i can set the windows wallpaper from a python program?

-ryan
 
D

Dietmar Schwertberger

ryan said:
the win32 python extentions don't seem to have "SysParametersInfo()" and i need it to
set the wallpaper in windows.

cyptes has a "SysParametersInfoA()" function but wont let me use the SPI_SETDESKWALLPA
PER attribute.

anyone have any ideas how i can set the windows wallpaper from a python program?

This is what I've been using with windll:

def set_wallpaper(wallpaper):
# refresh wallpaper
try:
import windll
g = windll.module("user32")
buf = windll.cstring(wallpaper)
g.SystemParametersInfo(20, 0, buf, 3)
except:
pass


Regards,

Dietmar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top