• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Find windows 'Internet Explorer'

How find all windows is name 'Internet Explorer' and get class name?
0
powersul
Asked:
powersul
  • 2
1 Solution
 
MathiasCommented:
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
 
doncovCommented:
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
 
MathiasCommented:
>> 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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now