Find windows 'Internet Explorer'

How find all windows is name 'Internet Explorer' and get class name?
powersulAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
doncovConnect With a Mentor Commented:
var
  wnd:HWND;
  caption:string;
begin
wnd:=GetTopWindow;
repeat
  SetLength(caption,GetWindowtextLength(wnd));
  GetWindowText(wnd,@caption[1],length(caption));

  if pos("Internet Explorer ",caption)>0 then ...

  wnd:=GetNextWindow(wnd,GW_HWNDNEXT);
until wnd=0;

end;
0
 
MathiasIT SpecialistCommented:
Use the Toolhelp32 functions like Process32First and Process32Next. The returned data consists of many helpful things (Path, PID, and so on...).
0
 
PeterLarsenCommented:
Hi P,

I'm not sure what you mean. Is is something like this :
var
 h : HWND;
begin
 h:=FindWindow(nil, 'Internet Explorer');

/PL
0
 
MathiasIT SpecialistCommented:
>> doncov

The code is right if the caption is Internet Explorer, but you can edit this caption in the registry. You will have to find the IE's window names and compare them.

But the question is answered and it ís simple and good...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.