How to get the html source from an explorer window knowing only the window handle via vb 6?

The exact question I needed an answer for was already in the forum.

How to get the html source from an explorer window knowing only the window handle - programaticlly??

However, the link to the answer does not work.  Could you post the answer back in the forum?

thanks,
bch
bch3000Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
bobbit31Connect With a Mentor Commented:
Dim shWindows           As New SHDocVw.ShellWindows
Dim tmpExplorer               As SHDocVw.InternetExplorer
 
For Each tmpExplorer In shWindows
   if tmpExplorer.HWND = <handle> then
     msgbox tmpExplorer.document.body.innerHTML
     exit for
   end if
Next

0
 
bobbit31Commented:
you'll need to add "Microsoft Internet Controls" under project/references
0
 
bobbit31Commented:
gimme points
0
All Courses

From novice to tech pro — start learning today.