开发者

WPF: Create your own screen-saver if your running application is 'idle'

开发者 https://www.devze.com 2022-12-24 01:19 出处:网络
Is there a way to create a window (similar to a screen-saver) that will be displayed once your running application is not \'interacting\' (or being idle) with the user, meaning to say开发者_运维问答,

Is there a way to create a window (similar to a screen-saver) that will be displayed once your running application is not 'interacting' (or being idle) with the user, meaning to say开发者_运维问答, no mouse movements happening on the application.

Some of my friends suggested to use a Timer for this one. Any suggestion for a good head start? Thanks.


If your looking to create your own screensaver just create another form. Remove the border from the form. Make it the top most and start maximized. Then you just paint the control to do whatever you want.

Then wire up the form to check if the mouse moves or a key is pressed. You'll need to create a timer that will determine if the screensaver should be shown.


This might help: http://www.codeproject.com/KB/miscctrl/csharpscreensaver.aspx.

There's a similar question on StackOverflow here: How to invoke the screen saver in Windows in C#?.

0

精彩评论

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

关注公众号