小弟想遍历一个application内的所有窗体和每个窗体内的控件的NAME,将所有的NAME都放到一个MEMO中,请问有什么办法可以做得到呢?万望各位大哥指点指点!
解决方案 »
- Delphi 2011 Xe如何进行DLL的调试(下断点)
- delphi 中的edit.txt 输入控制
- delphi 中如何从数据库中读取数据自生成TreeView,只有两个字段,数据库结构如下。急急!!
- 因为是新手在线求助 急急啊 200分
- 高分求网络分布提交汇总思路?
- 有没有更快一点的办法来测试数据库连接是否成功?■■■■■■■■■■■
- delphi中:要在form1.button1.click事件中调用form1.Formclose()事件,我要怎样做?
- 怎么在dataset中添加列和行,多谢
- 寻求帮助 有个用delphi 写个工具有个功能不完善 找人帮我看看
- actionlist的问题
- 谁能介绍一下delphi的stardard,additional的控件的详细的使用方法?
- ADOTable 的数据插入
~~procedure TForm1.Button1Click(Sender: TObject);
procedure pControlScan(mControl: TControl; mParentPath: string);
var
I: Integer;
begin
Memo1.Lines.Add(mParentPath + mControl.Name);
if mControl is TWinControl then
for I := 0 to TWinControl(mControl).ControlCount - 1 do
pControlScan(TWinControl(mControl).Controls[I],
mParentPath + mControl.Name + '.');
end;
var
I: Integer;
begin
for I := 0 to Screen.FormCount - 1 do
pControlScan(Screen.Forms[I], '');
end;
var I : integer;
begin
memo1.Lines.Clear;
for I:= 0 to form1.ComponentCount-1 do
begin
memo1.Lines.Add(form1.Components[I].Name);
end;
end;
var I : integer;
begin
memo1.Lines.Clear;
for I:= 0 to form1.ComponentCount-1 do
begin
memo1.Lines.Add(form1.Components[I].Name);
end;
end;
说得没错
begin
for j:=0 to Frm.ComponentCount-1 do
begin
if Frm.components[j] is TFlatCheckBox then
if TFlatCheckBox(Frm.components[j]).tag=No then
begin
if Flag then
begin
if not TFlatCheckBox(Frm.components[j]).checked then
TFlatCheckBox(Frm.components[j]).checked:=true;
end;
if not Flag then
begin
if TFlatCheckBox(Frm.components[j]).checked then
TFlatCheckBox(Frm.components[j]).checked:=false;
end;
end;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var i:integer;
begin
memo1.Lines.Clear;
for i:=1 to application.ComponentCount-1 do
begin
if (application.Components[i] is Tform) then
memo1.Lines.Add((application.Components[i] as Tform).Name); end;
end;
var
szBuffer:Array[0..20] of char;
begin
GetWindowText(hwnd,szBuffer,20);
ShowMessage(szBuffer);
end;procedure TForm1.Button1Click(Sender: TObject);
begin
EnumChildWindow(Application.Handle,&FindComponents,20);
end;