Disabling the Windows Screen Saver From Your Kiosk Application

Disable the screen saver from your kiosk applicationIn this article I’ll explain how to temporarily disable the built in Windows screen saver from your kiosk application.  If you’ve created a native Windows application (i.e. .NET WPF) to run on your self-service kiosk you probably don’t want it to be interrupted by the Windows screen saver.  Sure you could go to the screen saver settings and disable the screen saver completely but then you’d have to do that on ever single kiosk.  It would be more convenient to temporarily disable the screen saver only while your kiosk application is running.

Fortunately Microsoft has included support for disabling the Windows screen saver via the SetThreadExecutionState function.

By defining a timer in your kiosk application that periodically calls SetThreadExecutionState and passes in the display required attribute it forces the display idle timer to be reset and the display to stay on.  This ensures that the Windows screen saver will be temporarily disabled regardless of the screen saver settings and the kiosk display will always stay on.

When your kiosk application is closing you should call SetThreadExecutionState one last time and pass the continuous attribute to allow the kiosk display to go idle again.

This functionality is built into KioskSimple if you don’t want to roll your own.  KioskSimple also prevents your kiosk from sleeping/hibernating and blocks system keystrokes like Ctrl-Alt-Del and generally secures your kiosk application.  Try an a free demo of KioskSimple today!

 

 

Andrew Savala
Follow me

Andrew Savala

Andrew Savala is the CEO of RedSwimmer Inc., creators of the kiosk lockdown software KioskSimple. Andrew has been developing kiosk software since 2007, with an emphasis on self-service retail payment applications.
Andrew Savala
Follow me

Author: Andrew Savala

Andrew Savala is the CEO of RedSwimmer Inc., creators of the kiosk lockdown software KioskSimple. Andrew has been developing kiosk software since 2007, with an emphasis on self-service retail payment applications.

2 thoughts on “Disabling the Windows Screen Saver From Your Kiosk Application”

Comments are closed.