开发者

autmatic turnng off of the monitor when computer is locked

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.


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.


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


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)


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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜