【delphi源码】抓取并显示程序中的鼠标【delphi源码】抓取并显示程序中的鼠标

习题答案
考试通关必备网站

【delphi源码】抓取并显示程序中的鼠标

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TfrmMain = class(TForm)
procedure FormClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmMain: TfrmMain;
implementation
{$R *.dfm}
procedure TfrmMain.FormClick(Sender: TObject);
var
ico:TIcon;
point:TPoint;
begin
GetCursorPos(point);
point:=ScreenToClient(point);
ico:=TIcon.Create;
ico.Handle:=GetCursor();
Canvas.Draw(point.X,point.Y,ico);
ico.Free;
end;
end.
未经允许不得转载:亿券答案网 » 【delphi源码】抓取并显示程序中的鼠标

我来解答

匿名发表
  • 验证码: