ctypes ques

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ryan

    ctypes ques

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

    cyptes has a "SysParametersI nfoA()" function but wont let me use the SPI_SETDESKWALL PAPER attribute.

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

    -ryan

  • Dietmar Schwertberger

    #2
    Re: ctypes ques

    In article <mailman.105994 5127.2702.pytho [email protected] >, ryan
    <URL:mailto:tox icpulse@sbcglob al.net> wrote:[color=blue]
    > the win32 python extentions don't seem to have "SysParametersI nfo()" and i need it to
    > set the wallpaper in windows.
    >
    > cyptes has a "SysParametersI nfoA()" function but wont let me use the SPI_SETDESKWALL PA
    > PER attribute.
    >
    > anyone have any ideas how i can set the windows wallpaper from a python program?[/color]

    This is what I've been using with windll:

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


    Regards,

    Dietmar

    Comment

    Working...