How to set Screensaver programmatically?

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

    #1

    How to set Screensaver programmatically?

    Hi,

    i wanted to know, how to set a Screensaver programmaticall y under WinXP and
    Win2000?

    Thank you
    Yavuz Bogazci
  • Alex Clark

    #2
    Re: How to set Screensaver programmaticall y?

    Hi Yavuz,

    It depends what you mean by "set Screensaver". If you want to set it
    running, I believe a P/Invoke call to SystemParameter sInfo with a param of
    SPI_SETSCREENSA VEACTIVE trick.

    If you want to actually tell Windows what the current screensaver is (so
    that when the user checks out display properties it's selected as their SS
    of choice) I'm not sure that there's an API call that will help you, however
    you could just programmaticall y alter the appropriate registry key.

    Regards,
    Alex Clark



    "Yavuz Bogazci" <YavuzBogazci@d iscussions.micr osoft.com> wrote in message
    news:63BDFF59-0201-4523-B8F3-E05350DB6803@mi crosoft.com...[color=blue]
    > Hi,
    >
    > i wanted to know, how to set a Screensaver programmaticall y under WinXP
    > and
    > Win2000?
    >
    > Thank you
    > Yavuz Bogazci[/color]


    Comment

    • Yavuz Bogazci

      #3
      Re: How to set Screensaver programmaticall y?

      ok thank you,

      i need the 2nd case. are the registry keys for winxp and win2000 the same?

      thanks
      yavuz bogazci

      "Alex Clark" wrote:
      [color=blue]
      > Hi Yavuz,
      >
      > It depends what you mean by "set Screensaver". If you want to set it
      > running, I believe a P/Invoke call to SystemParameter sInfo with a param of
      > SPI_SETSCREENSA VEACTIVE trick.
      >
      > If you want to actually tell Windows what the current screensaver is (so
      > that when the user checks out display properties it's selected as their SS
      > of choice) I'm not sure that there's an API call that will help you, however
      > you could just programmaticall y alter the appropriate registry key.
      >
      > Regards,
      > Alex Clark
      >
      >
      >
      > "Yavuz Bogazci" <YavuzBogazci@d iscussions.micr osoft.com> wrote in message
      > news:63BDFF59-0201-4523-B8F3-E05350DB6803@mi crosoft.com...[color=green]
      > > Hi,
      > >
      > > i wanted to know, how to set a Screensaver programmaticall y under WinXP
      > > and
      > > Win2000?
      > >
      > > Thank you
      > > Yavuz Bogazci[/color]
      >
      >
      >[/color]

      Comment

      • Alex Clark

        #4
        Re: How to set Screensaver programmaticall y?

        Hi,
        [color=blue]
        >
        > i need the 2nd case. are the registry keys for winxp and win2000 the same?
        >[/color]

        I can't be sure about that, but my assumption would be that they are (and
        quite possibly as far back as Win95 in fact). The best thing to do is see
        if you can get your hands on machines running a variety of Win OS's, or if
        you have the licenses just install them in VirtualPC and test from there.

        Cheers,
        Alex Clark


        Comment

        Working...