请说清楚些,如果只要一个黑屏,一个Form涂成黑色就解决了:)

解决方案 »

  1.   

    Turn monitor off : 
    --------------------------------------------------------------------------------
    SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0);
    --------------------------------------------------------------------------------Turn monitor on : 
    --------------------------------------------------------------------------------
    SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, -1);
    --------------------------------------------------------------------------------
      

  2.   

    最后面参数的意狮
    1 means the display is going to low power.2 means the display is being shut off.
      

  3.   

    procedure TurnMonitorPower(TurnOff: Boolean);
    begin
      if TurnOff then
        SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, -1)
      else //Turn On
        SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 1);
    end;
      

  4.   

    "知之为知之,不知为不知"说的好。
    你的程序不能出现效果是因为你的其他动作又激活了显示器。
    你可以设一个timer,interval:=5000;
    onTimer事件写
      SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 1);
    名誉保证可以。
      

  5.   

    to nick_he 你在win2000下试了吗,我都已经试了n次了,不行
      

  6.   

    我当然是试过的。
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls, ExtCtrls;type
      TForm1 = class(TForm)
        Timer1: TTimer;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
        procedure Timer1Timer(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
    VAR
    I:INTEGER;
    begin
        TIMER1.ENABLED:=TRUE;end;procedure TForm1.Timer1Timer(Sender: TObject);
    VAR
        i:integer;
    begin
    //     FOR I:=0 TO 2 DO
            SendMessage(Application.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 1);
    end;end.//以下为form1的text
    object Form1: TForm1
      Left = 193
      Top = 107
      Width = 696
      Height = 480
      Caption = 'Form1'
      Color = clBtnFace
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      OldCreateOrder = False
      PixelsPerInch = 96
      TextHeight = 13
      object Button1: TButton
        Left = 120
        Top = 176
        Width = 75
        Height = 25
        Caption = 'Button1'
        TabOrder = 0
        OnClick = Button1Click
      end
      object Timer1: TTimer
        Interval = 5000
        OnTimer = Timer1Timer
        Left = 96
        Top = 72
      end
    end
    你可以试试
      

  7.   

    中文Windows 2000 Prof版
    版本5。0(2195)
    对吧。
    你可以把for 那一行的注释去掉,我这里1和2 都可以