static void Main() { System.Threading.Thread.Sleep(2000); SendMessage((new Form()).Handle, WM_SYSCOMMAND, (IntPtr)SC_MONITORPOWER, (IntPtr)2); } static private int SC_MONITORPOWER = 0xF170; static private uint WM_SYSCOMMAND = 0x0112; [DllImport("user32.dll")] static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)