Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ctypes ques

Reply
Thread Tools

ctypes ques

 
 
ryan
Guest
Posts: n/a
 
      08-03-2003
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

 
Reply With Quote
 
 
 
 
Dietmar Schwertberger
Guest
Posts: n/a
 
      08-04-2003
In article <mailman.1059945127.2702.python->, ryan
<URL:private.php?do=newpm&u=> wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WindowsXP/ CTypes - How to convert ctypes array to a string? dudeja.rajat@gmail.com Python 0 08-19-2008 10:20 AM
RE: [ctypes-users] [Ann] ctypes 0.9.0 released Henk Punt Python 0 07-23-2004 10:34 PM
QUES: ODFX/IDFX inferred in syplify, and not in XACT libraries ???? Ted VHDL 1 02-03-2004 11:58 PM
QUES: Where can I find Xilinx M1 tools Ted VHDL 6 01-21-2004 03:18 PM
IOS version Ques: VLAN encap Brad Cleghorn Cisco 3 07-15-2003 07:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57