用Getwindow()可以知道所有運行的窗口:<br>var hcurrentwindow:thandle;<br> sztext:array [0..255] of char;<br>hCurrentWindow := GetWindow(Handle, GW_HWNDFIRST);<br> while hCurrentWindow <> 0 do<br> begin<br> if GetWindowText(hCurrentWindow, @szText, 255)>0 then<br> begin<br> //此窗口有標題,可用Setwindow(hCurrentWindow,'ffff')更改。<br> <br> end;<br> hCurrentWindow:=GetWindow(hCurrentWindow, GW_HWNDNEXT);<br> end;