GetCursorPos函数可以帮助你得到当前老鼠的位子!

解决方案 »

  1.   

    OnMouseDown事件里面有X,Y参数,就是鼠标在窗体上的位置
    Form.ClientToScreen( ClientPoint)可以得到相对于屏幕的位置API函数 GetCursorPos( Point)可以得到鼠标在当前屏幕上的位置
      

  2.   

    //以上都对
    //还可以
    procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    begin
    //  X, Y
    end;
      

  3.   

    procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    begin
      ShowMessage(IntToStr(X) + '  ' + IntToStr(Y));
    end;