⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tszs3.htm

📁 Delphi文摘精华
💻 HTM
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>查阅所有可视窗口标题 </title></head><body><pre>运用API函数 GetWindow() 配合 GetWindowText() 逐一查出各视窗的标题   1. File | New Project 开始一个新的工程   2. 在 Form1 中安排 Button 与 Memo 各一   3. 在 Button1 的 OnClick 事件中撰写程式如下:     procedure TForm1.Button1Click(Sender: TObject);     var        hCurrentWindow: HWnd;        szText: array[0..254] of char;     begin        hCurrentWindow := GetWindow(Handle, GW_HWNDFIRST);        while hCurrentWindow &lt;&gt; 0 do        begin           if GetWindowText(hCurrentWindow, @szText, 255) &gt; 0 then              Memo1.Lines.Add(StrPas(@szText));           hCurrentWindow := GetWindow(hCurrentWindow, GW_HWNDNEXT);        end;     end;</pre></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -