{"id":734,"date":"2016-09-27T17:01:01","date_gmt":"2016-09-27T08:01:01","guid":{"rendered":"http:\/\/cromi.com\/?p=734"},"modified":"2016-09-27T18:30:48","modified_gmt":"2016-09-27T09:30:48","slug":"c-%eb%aa%a8%eb%8b%88%ed%84%b0-on-off-%ec%b2%98%eb%a6%ac","status":"publish","type":"post","link":"http:\/\/cromi.com\/?p=734","title":{"rendered":"C#  \ubaa8\ub2c8\ud130 On   OFF \ucc98\ub9ac"},"content":{"rendered":"<pre lang=\"csharp\">\r\nusing System.Runtime.InteropServices;  \/\/  using \ucd94\uac00 \r\n<\/pre>\n<pre lang=\"csharp\">\r\n\t\/\/ \ubaa8\ub2c8\ud130 On\/Off \uad00\ub828  \uc120\uc5b8 \r\n\tpublic  int WM_SYSCOMMAND = 0x0112;\r\n\tpublic int SC_MONITORPOWER = 0xF170;\r\n\tconst int MONITOR_ON = -1;\r\n\tconst int MONITOR_OFF = 2;\r\n\tconst int MONITOR_STANBY = 1;\r\n<\/pre>\n<pre lang=\"csharp\">\r\n        \/\/ dll \ucc38\uc870 \r\n\t[DllImport(\"user32.dll\")]   \r\n\tprivate static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);  \r\n<\/pre>\n<pre lang=\"csharp\">\r\n\tSendMessage(this.Handle.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF); \r\n        \/\/ \ubaa8\ub2c8\ud130 OFF\r\n\tSendMessage(this.Handle.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_ON);\r\n        \/\/ \ubaa8\ub2c8\ud130 ON\r\n<\/pre>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>using System.Runtime.InteropServices; \/\/ using \ucd94\uac00 \/\/ \ubaa8\ub2c8\ud130 On\/Off \uad00\ub828 \uc120\uc5b8 public int WM_SYSCOMMAND = 0x0112; public int SC_MONITORPOWER = 0xF170; const int MONITOR_ON = -1; const int MONITOR_OFF = 2; const int MONITOR_STANBY = 1; \/\/ dll \ucc38\uc870 [DllImport(&#8220;user32.dll&#8221;)] private static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam); SendMessage(this.Handle.ToInt32(), WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF); [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[16,54,299,300,240,298],"class_list":["post-734","post","type-post","status-publish","format-standard","hentry","category-vs2008","tag-c","tag-c-2008","tag-c--off","tag-c--on","tag-c2008","tag--on-off"],"_links":{"self":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=734"}],"version-history":[{"count":7,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/734\/revisions"}],"predecessor-version":[{"id":741,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/734\/revisions\/741"}],"wp:attachment":[{"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=734"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}