본문 바로가기

카테고리 없음

[C#/.NET]모니터 끄기, Monitor Off



        public int WM_SYSCOMMAND = 0x0112;
        public int SC_MONITORPOWER = 0xF170; 
        [DllImport("user32.dll")]
        private static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);
        /////
        SendMessage(this.Handle.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, 2);