Turn screen On and Off


i execute a worklfow that shows various information as it comes available. However the screens used are not 24/7 rated. Is there a activity which can turn the monitor on if there is a new information and turn it off after a specific amount of time?

Greetings randomtrash

1 Like

It is really interesting question. I am also interesting to get answer…


Hi @randomtrash,
I haven’t heard about such activity. Anyway I think it’s not that easy. Monitor is controlled by graphic card and it’s stays up as long as graphic card gives the signal to it. This probably requires something related to graphic card driver but I guess it could provide some issues too. What if you want to use computer but screen is off and awaits for signal from workflow? :thinking:


I am not sure if the following code works or not. I have not tested but it will give you some idea about it.

Ref - c# - Turn on/off monitor - Stack Overflow

namespace MonitorOff {

    public enum MonitorState {
        MonitorStateOn = -1,
        MonitorStateOff = 2,
        MonitorStateStandBy = 1

    public partial class Form1 : Form {
        private static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);

        public Form1() {
            SystemEvents.SessionSwitch += SystemEvents_SessionSwitch;

        void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e) {

        private void button1_Click(object sender, EventArgs e) {

        private void SetMonitorInState(MonitorState state) {
            SendMessage(0xFFFF, 0x112, 0xF170, (int)state);

Karthik Byggari