?
Solved

How do you stop the computers Monitor/Screensaver turning on?

Posted on 2010-09-08
6
Medium Priority
?
558 Views
Last Modified: 2012-05-10
Hi, when my computer is turned on, and I stop moving the mouse after a set amount of time, the monitor would turn off, and then I move the mouse it turns back on, how do I stop the monitor turning on while I'm doing something.

needs to be programmable.

so its toggles on/off.
0
Comment
Question by:eNarc
[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
6 Comments
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 500 total points
ID: 33632486
I dont have delphi environment running but hoping something below helos

this is not disabling or enabling screensaver, but a kind of workaround http://delphi.about.com/cs/adptips2001/a/bltip0901_5.htm

tweaking it the registry way http://delphi.about.com/od/windowsshellapi/a/tregistry.htm

this one talks about disabling http://www.delphicorner.f9.co.uk/articles/wapi11.htm
0
 
LVL 5

Expert Comment

by:Iekos
ID: 33632507
What version of Windows?
0
 
LVL 14

Expert Comment

by:systan
ID: 33632717
>>how do I stop the monitor turning on while I'm doing something.
Well don't touch the mouse or keyboard

If you really want to do that, use the "System Standby"
set your screen saver to 1 minute
set your turn off monitor for 2 minutes
set your system standby for 3 minutes
With that, nothing to worry, pressing the power again would start the computer again
And use also the hibernate.

There's no need to programmatically do that,  unless your building for other users for an application with that option.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 38

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 500 total points
ID: 33634078
just disable power saving in windows
and switch off the screen saver

right click on desktop > properties > power management

after the screen saver kicks in, it will switch on the monitor
you can switch it back off with this:

http://www.codeproject.com/KB/cs/Monitor_management_guide.aspx

Turn the monitor OFF, using:
SendMessage(ValidHWND, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF);

Put the monitor to STAND BY, using:
SendMessage(ValidHWND, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_STANDBY);
0
 
LVL 19

Accepted Solution

by:
MerijnB earned 500 total points
ID: 33635411
Some code snippets:

 fScreenSaverActive: boolean;

 // store current setting
 SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, @fScreenSaverActive, 0);

 // disable screensaver
 SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 0, nil, 0);

 // restore saved setting
 SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, cardinal(fScreenSaverActive), nil, 0);

Open in new window

0
 
LVL 14

Assisted Solution

by:systan
systan earned 500 total points
ID: 33635416
Well he doesn't want to disable it, he wants to disable the turnning back ON of the monitor,
in other words?,  he doesn't want the monitor to TURN-ON back, he always wants the monitor OFF.
What's that? a virus application? sorry for that, but it's unusual.

Here's the code;
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls;

const
MONITOR_OFF = 2;
MONITOR_ON = $FFFFFFFF;
MONITOR_STANDBY = 1;

type
  TForm1 = class(TForm)
    Timer1: TTimer;
    procedure FormCreate(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    procedure Timer1Timer(Sender: TObject);
  private
    { Private declarations }
  procedure WMSysCommand (var Msg: TWMSysCommand) ;
  message WM_SYSCOMMAND;

  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.WMSysCommand(var Msg: TWMSysCommand) ;
 begin
   if Msg.CmdType = SC_MONITORPOWER then
   begin
   timer1.Enabled := true;
   end;
   DefaultHandler(Msg) ;
 end;

procedure TForm1.FormCreate(Sender: TObject);
begin
timer1.Interval :=1;
timer1.Enabled :=false;
end;

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
timer1.Enabled :=false;
SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_ON);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF);
end;

end.

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

752 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