ctypes ques

Discussion in 'Python' started by ryan, Aug 3, 2003.

  1. ryan

    ryan Guest

    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
    ryan, Aug 3, 2003
    #1
    1. Advertising

  2. In article <>, ryan
    <URL:mailto:> 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
    Dietmar Schwertberger, Aug 4, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ted
    Replies:
    6
    Views:
    755
  2. Ted
    Replies:
    1
    Views:
    614
    Philip Freidin
    Feb 3, 2004
  3. Ignoramus

    Ques on HDL: Please help

    Ignoramus, Jan 28, 2006, in forum: VHDL
    Replies:
    1
    Views:
    461
  4. Henk Punt
    Replies:
    0
    Views:
    390
    Henk Punt
    Jul 23, 2004
  5. Replies:
    0
    Views:
    491
Loading...

Share This Page