How to access Internet Explorer page from external app

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way in .Net or via interop (com etc.) for an external application
(a .net winform for example) to read the html contents (or the DOM) of a
running instance or internet explorer? I trying to write a timer app that
looks for the existance of an html tag and then does something.
Thanks,
Jim
 
Hi Jim
yes you can read a contents of remote web page in .net using WebRequest and
WebResponse classes available under System.Net namesapce in .net f ramework
2.0
you can try with this code

WebRequest objRequest = WebRequest.Create("Your URL Here");
WebResponse objResponse = objReqiest.GetResponse();

Regards
Nitin Mittal
 
Delving into the lower sections of my brain (the dusty bit) I recall
fiddling with global windows hooks and windows messages. There will be no
native .net way of doing what your after but you may be able to hook into IE
and read its window contents using pInvoke.

Perhaps this can give you some insight into talking to IE. Its delphi but
the explanations good.
http://delphi.about.com/od/windowsshellapi/l/aa060303a.htm

also.
http://msdn.microsoft.com/msdnmag/issues/02/10/cuttingedge/

What might though be easier may be to write a plugin for IE, and have it
talk via socket calls to your monitoring application if you can get it to
read the contents.
http://www.codeproject.com/csharp/dotnetbandobjects.asp
 
Back
Top