delphi 修改窗口标题


本文整理自网络,侵删。

 unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
hwins:dword;
rets:boolean;

begin
hwins:=FindWindow(nil,'新建 文本文档.txt - 记事本');
rets:=SetWindowText(hwins,'修改成功了!');
if rets=false then
label1.Caption :='修改失败!'
else
label1.caption :='修改成功!'
end;
end.

相关阅读 >>

Delphi xe2 - 点点滴滴

Delphi idhttp1 获取网页代码

Delphi gdi+ 文本输出

Delphi程序在每个windows 会话中只执行一次

Delphi 几种程序自杀的方法

Delphi中内嵌汇编

Delphi中嵌入汇编检测是否在虚拟机里运行

Delphi xe4 for ios 谨慎处理字符串

Delphi篇之写托盘图标

Delphi 操作sql 插入一万条数据 三种方式速度测试

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



打赏

取消

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

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

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

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

评论

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