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

Retrieve Title From Browser

I would like to retrieve the title of the current web page (IE)from within my Delphi application.

What VCL should I use to acomplish this.

Thanks,
Arch
0
abrooks
Asked:
abrooks
  • 2
1 Solution
 
intheCommented:
hi,
you can do this:

procedure TForm1.Button1Click(Sender: TObject);
Var
 Explorer : HWND;
 CaptionText : array[0..255]of Char;
begin
 Explorer := FindWindow('IEFrame', nil);
 If Explorer <> 0 Then Begin
 GetWindowText(Explorer,CaptionText,255);
 Label1.caption:='Internet Explorers Caption is :  '+ string(CaptionText);
 end;
 end;


Regards Barry
0
 
abrooksAuthor Commented:
What is the netscape equivalent please?
0
 
intheCommented:
sorry i dunno as i dont use netscape,you just need to find the main netscape windows classname.
use winsight(comes with some versions of delphi ) or search on net for a program called sinfo ,this also tells classnames and replace the clasname ieframe to what ever netscapes is..
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

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