autmatic turnng off of the monitor when computer is locked

734 views Asked by At

I want to write a program in java such that as soon as the computer is locked by pressing (ALT +CTR+DEL -> lock comp ) the monitor becomes off.I want to implement this is java.

Also when user presses any key of keyboard the monitor shold be on.

How can i do this?

I want to save the electricity by doing this and make save environment.

5

There are 5 answers

0
Peter Lang On BEST ANSWER

As others said, don't use Java.

If you use Windows, you might want to have a look at the monitor off and lockws commands of NirCmd.

0
Bombe On

That is a function that is already implemented by your operating system. It’s tied in so deeply with operation system and hardware dependent functions that it’s impossible to in pure Java, anyway.

1
Tom Duckering On

Set your screen saver and energy saving settings and be done with.

In the time saved not writing this in Java you can do some recycling :o)

1
o.k.w On

It'll be easier to do this:
ALT+CTR+DEL -> lock comp -> Press monitor power switch.

3
Adriaan Koster On

You could build a cool robot arm, controlled by a Java program, which presses the monitor button for you. Check out http://mindstorms.lego.com