我想在我得程序中关闭/打开显示器,应该怎样实现?

解决方案 »

  1.   

    WM_SYSCOMMAND    WPARAM wParam
        LPARAM lParam;
    SC_MONITORPOWER
    Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer. 
    The lParam parameter can have the following values:1 - the display is going to low power2 - the display is being shut off
      

  2.   

    to:masterz
    能不能给个程序片断?实际使用一下!最好用中文,我得英文不好!:P
      

  3.   

    SendMessage(GetDesktopWindow(),WM_SYSCOMMAND,SC_MONITORPOWER,2);
      

  4.   

    to:masterz
    你给的程序是关闭监视器
    那么怎么用程序打开呢?
    谢谢