private void Form1_Load(object sender, EventArgs e) { User32DLL.SendMessage(this.Handle, (int)SysCommands.WM_SYSCOMMAND, (int)SysCommands.SC_MONITORPOWER, 2); }
private void button2_Click(object sender, EventArgs e) { User32DLL.SendMessage(this.Handle, (int)SysCommands.WM_SYSCOMMAND, (int)SysCommands.SC_MONITORPOWER, -1); }