如題:也就是不要鼠標的箭頭出現。而且不能響應鼠標事件。只能用鍵盤來操作,像DOS一樣。
謝謝~~~!

解决方案 »

  1.   

    procedure TForm1.FormCreate(Sender: TObject);
    begin
       Screen.Cursor:=crNone; //隐藏鼠标
    end;
      

  2.   

    安装个钩子屏蔽鼠标的一切动作。另Screen.Cursor:=crNone; 
    如下:
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure FormCreate(Sender: TObject);
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;
      hhk: THandle;implementation{$R *.dfm}function MouseHook(nCode: integer; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
    begin
      if (nCode = HC_ACTION) then
      else
        CallNextHookEx(hhk, nCode, wParam, lParam);
    end;procedure TForm1.FormCreate(Sender: TObject);
    begin
      Screen.Cursor := crNone;
      if hhk = 0 then
        hhk := SetWindowsHookEx(WH_MOUSE, MouseHook, hInstance, GetCurrentThreadid);
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      ShowMessage('23123');
    end;end.