var
h0, h1: HWnd;
s: array[0..1023] of Char;
begin
h0 := FindWindowEx('tform1', 'form1');
if h0 > 0 then
begin
h1 := GetWindow(h0, GW_CHILD);
while h1 > 0 do
begin
GetWindowText(h1, s, SizeOf(s));
ShowMessage(s);
GetClassName(h1, s, SizeOf(s));
ShowMessage(s);
h1 := GetNextWindow(h1, GW_HWNDNEXT);
end;
end;
end;