Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Disable Screen Saver & Monitor Turn off  ??

Posted on 1999-07-26
8
Medium Priority
?
436 Views
Last Modified: 2013-12-03
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
Comment
Question by:jhjeon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 3

Expert Comment

by:BudVVeezer
ID: 1403696
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
 

Author Comment

by:jhjeon
ID: 1403697
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
 
LVL 3

Expert Comment

by:BudVVeezer
ID: 1403698
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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Expert Comment

by:cgod
ID: 1403699
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
 

Author Comment

by:jhjeon
ID: 1403700
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
 
LVL 6

Expert Comment

by:setiawan
ID: 1403701
Monitor Power Saving ?
It depends on that monitor (support or not)
If support windows will do for you automatically
0
 
LVL 1

Accepted Solution

by:
cwgues earned 400 total points
ID: 1403702
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
 

Author Comment

by:jhjeon
ID: 1403703
very very ...Thanks ..cwgues...

have a good day ..^_^
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question