本文整理自网络,侵删。
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 采用 tidhttp 访问 https 的网站,采用 tidtcpclient 访问 https 的网站
Delphi google text to speech api
更多相关阅读请进入《Delphi》频道 >>