模拟鼠标点击 查找窗口标题


本文整理自网络,侵删。

 unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var ddphwnd:hwnd ;
begin
ddphwnd:=findwindow(nil,'标题');
//获取窗口句柄
sendmessage(ddphwnd,messages.WM_LBUTTONDOWN,0,$0183017F); //单击
sendmessage(ddphwnd,messages.WM_LBUTTONUP,0,$0183017F); //弹起

end;

end.

相关阅读 >>

Delphi文本文件的写操作

Delphi中的各种文件类型介绍

Delphi 编译发布安卓的app名字问题

Delphi 程序获取传参

Delphi 获取 access 数据库所有表

Delphi 使用 inputbox、inputquery 的启发

Delphi 一个call应该如何写?

Delphi idhttp下载带清理网络缓存

Delphi 使用tmemorystream保存多张图片到文件,并读取

Delphi 字符串是否包含

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...