I am making a WPF C# program. For the next stage I want to create a message that appears on the screen after half an hour of inactivity. I define inactivity as no mouse movements and no keys pressed. I have two questions for this

1) How would I trigger the message to show after half an hour of inactivity?

2) How would I cancel the windows screensaver if it is running?

So far I have looked at:

You will see that frustrating most results point to creating a windows/linux screensaver rather than helping with my goal which is creating code that triggers from inactivity like the windows screensaver does.

有帮助吗?

解决方案

Try looking at this article on code project.

The trick was to search for "System Idle" instead of "Screen Saver Effect".

(Credit to Darin Dimitrov's answer)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top