[python-win32] settin wallpaper

DogWalker forestiero at qwest.net
Sun Aug 3 19:56:58 EDT 2003


As the exception says: You must define 'SPI_SETDESKWALLPAPER' .

from win32con import SPI_SETDESKWALLPAPER

-- or--

from win32con import *

-- or --

SPI_SETDESKWALLPAPER = 0x14

-- or --

Use 0x14 or 20 in place of SPI_SETDESKWALLPAPER in the function call

HTH

----- Original Message ----- 
From: ryan
To: DogWalker
Sent: Sunday, August 03, 2003 6:00 PM
Subject: Re: [python-win32] settin wallpaper


thats what i was doing, sorry for the typeo..

>>> from ctypes import *
>>> windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0,
'C:\pics\closeu
p.jpg', 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'SPI_SETDESKWALLPAPER' is not defined
----- Original Message ----- 
From: DogWalker
To: Python-win32 at python.org
Sent: Sunday, August 03, 2003 5:56 PM
Subject: Re: [python-win32] settin wallpaper


Try this:

    windll.user32.SystemParametersInfoA(.....

You were calling the wrong function. If you just mistyped it in your email,
repost with the pertinent code, including the value you used for
SPI_SETDESKWALLPAPER and pertinent import statements.

HTH
----- Original Message ----- 
From: ryan
To: python-win32 at python.org
Sent: Sunday, August 03, 2003 4:05 PM
Subject: [python-win32] settin wallpaper


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



_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32




_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32




More information about the Python-win32 mailing list