有无程序可以执行就关闭显示器。
即是显示器的灯是黄色的,只要一操作就亮起来,而不是关显示器的电源。

解决方案 »

  1.   

    这个可能跟Windows的能源管理驱动有关,帮你UP.
      

  2.   

    一般有休眠功能的显示器自带驱动盘中会有相关dll,但不同显示器提供的文件不同,所以没法做成通用程序。
      

  3.   

    ::PostMessage(::GetDesktopWindow(),WM_SYSCOMMAND,SC_MONITORPOWER,2);
      

  4.   

    WM_SYSCOMMANDlParam:SC_MONITORPOWER   Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer.
    lParam can have the following values:1 means the display is going to low power.2 means the display is being shut off.
     我试过了,用1不行,2就可以,关了之后,移动一下鼠标就又打开了。
      

  5.   

    这样也可以运行屏幕保护程序啦
    ::PostMessage(::GetDesktopWindow(),WM_SYSCOMMAND,SC_SCREENSAVE,0);
      

  6.   

    delphi就是:PostMessage(GetDesktopWindow,WM_SYSCOMMAND,SC_MONITORPOWER,2);
      

  7.   

    PostMessage(GetDesktopWindow,WM_SYSCOMMAND,SC_MONITORPOWER,0);使显示器恢复过来