• 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 ???



0
jhjeon
Asked:
jhjeon
1 Solution
 
BudVVeezerCommented:
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!

~Aaron
0
 
jhjeonAuthor Commented:
no..

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 ...


0
 
BudVVeezerCommented:
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!

~Aaron
0
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.

 
cgodCommented:
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.
0
 
jhjeonAuthor Commented:
um...

Do you know system registry infomation..

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

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

but...

   Monitor Power Saving -> ???

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

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

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

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

have a good day ..^_^
0

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