• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

Disable Screen Saver & Monitor Turn off ??

Hello experts...

I want to make  screen saver and monitor turn off  
disable in my Win32 Program ??

Is there any API Fuction about it or any programming logic ???

1 Solution
A simple answer.  No.  You will not be able to turn the monitor off for simple reasons.  On many desktop model computers, the monitor power is a hard wired switch.  Think about how badly things would go wrong if you turned the power off while the switch was in the on position!  =oP  But..honestly, it is impossible for you to turn off the power to a monitor programmatically.  =(  Sorry!  As for disabling the screen saver, if you still wish to persue this, I can show you how to do it.  Just let me know!

jhjeonAuthor Commented:

my meaning is..

Monitor turn off is automatically off in windows 95..

Win95 Power saving Function..(Enery Star ?)

see disply info->screen saver (monitor power saving)...

when we see movies in win95.....

automatically...screen saver run and monitor off...

I like to prevent it...as programming ...

Ah!  I understand now, you should have put that in the original question.  ::shrugs:: I don't know of a way to do it, but I'm SURE it can be done.  I have the feeling you will be working on a very low level though, no easy APIs for it.  Sorry!

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

To disable the screen saver, you have two options that I know of.. One, remove the SCRNSAVE.EXE value from the [boot] section of system.ini.. This can be done via WritePrivateProfileString. The other method is by using SystemParametersInfo() with the SPI_SETSCREENSAVEACTIVE flag.

As for disabling the power-saving features of the monitor, it's another call to SystemParametersInfo(), this time with SPI_SETPOWEROFFACTIVE. This one I've never done myself, but it should work.

I don't have any code for either of these at my disposal right now, which is why this is just a comment instead of an answer, but good luck with it anyway.
jhjeonAuthor Commented:

Do you know system registry infomation..

...Screen Saver -> ScreenSaveActive ..flag
   we can adjust 1 or 0 ...

   this is Screen Saver..ON/OFF...


   Monitor Power Saving -> ???

do you know Monitor Power Saving registry ???...

if you can answer it.. then I will give you posints...
Monitor Power Saving ?
It depends on that monitor (support or not)
If support windows will do for you automatically
This will sort it out put this in your WndProc

case WM_SYSCOMMAND:        
    if((wParam&0xFFF0)==SC_SCREENSAVE || (wParam&0xFFF0)  ==SC_MONITORPOWER)
       return 0;

jhjeonAuthor Commented:
very very ...Thanks ..cwgues...

have a good day ..^_^

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now