Delphi 取最前窗口标题(不重复)


本文整理自网络,侵删。

 Delphi 取最前窗口标题(不重复)

memo1.Align:=alClient;

procedure TForm1.Timer1Timer(Sender: TObject);
var
p:pchar;
itemp:integer;
begin

p:=allocmem(255);
itemp:=GetForegroundWindow;
GetWindowText(itemp,p,255);
if (p<>'') then
begin
if Pos(p,Memo1.Text)=0 then //不重复,则添加,已有重复的不再添加到memo中

Memo1.Lines.Add(p) ;
end;
freemem(p,255);
end;

相关阅读 >>

Delphi twebbrowser get html source after ajax load

Delphi 创建一个进程并读取其控制台输出内容

Delphi 自定义产生随机字符串函数

Delphi strtodatetime 这个函数在win7下出错

Delphi以鼠标为中心缩放图片以及拖动(采用区域抠图拉伸的方式)

Delphi 7中ado控件打开access数据库文件

Delphi模仿“千千静听”滚动标题栏

Delphi和outputdebugstring

Delphi用代码实现注册ocx和dll

Delphi 只用一条语句就能使tbitmap反色

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



打赏

取消

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

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

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

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

评论

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