使用 FindWindow() 找到指定应用程序的句柄 ,若是本程序的话就不说了<br>再用API函数GetClassName 可以知道该窗口的类名.<br><br>var<br> className: PChar;<br> i: Integer;<br>begin<br> className := AllocMem(100);<br> className[0] := '0';<br> for i := 0 to Form1.ComponentCount - 1 do<br> begin<br> if (Form1.Components Is TWinControl ) then<br> if GetClassName(TWinControl(Form1.Components).Handle, <br> className, 100) <> 0 then<br> ShowMessage(className);<br> className[0] := '0';<br> end;<br> FreeMem(className);<br>end;<br><br>