Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to programmatically disable screen saver?

How to programmatically disable screen saver?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 4 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi, my program needs to do some lengthy process without any interruption on users computer, however if the user has screen saver enabled things will be completely screwed up. I remember I saw a post here about disabling screen saver a few eeks ago but now I can't find it anymore. Thanks.

    D A J 3 Replies Last reply
    0
    • A Anonymous

      Hi, my program needs to do some lengthy process without any interruption on users computer, however if the user has screen saver enabled things will be completely screwed up. I remember I saw a post here about disabling screen saver a few eeks ago but now I can't find it anymore. Thanks.

      D Offline
      D Offline
      Diarrhio
      wrote on last edited by
      #2

      Look up SystemParametersInfo in MSDN. There is a section on screen savesr.

      1 Reply Last reply
      0
      • A Anonymous

        Hi, my program needs to do some lengthy process without any interruption on users computer, however if the user has screen saver enabled things will be completely screwed up. I remember I saw a post here about disabling screen saver a few eeks ago but now I can't find it anymore. Thanks.

        A Offline
        A Offline
        Alexander Wiseman
        wrote on last edited by
        #3

        Hello! Here is the link to the entire thread: http://www.codeproject.com/script/comments/forums.asp?msg=258720&forumid=1647#xx258720xx[^] Hope that helps! Sincerely, Alexander Wiseman Est melior esse quam videri It is better to be than to seem

        1 Reply Last reply
        0
        • A Anonymous

          Hi, my program needs to do some lengthy process without any interruption on users computer, however if the user has screen saver enabled things will be completely screwed up. I remember I saw a post here about disabling screen saver a few eeks ago but now I can't find it anymore. Thanks.

          J Offline
          J Offline
          Joe Woodbury
          wrote on last edited by
          #4

          BOOL screenSaverActive; SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &screenSaverActive, 0); if (screenSaverActive) SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0); ... if (screenSaverActive) // restore screen saver SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, 0);

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups