VB6.0 IE 6 and BHOs....
I'm writing a standard VB .exe app that is called from a custom button on the Internet Explorers Toolbar.
This is working okay...however the part I'm having infinite problems with is the following:
When the user clicks my button, a small window appears asking for a File name (this all works)
When the user has typed a name and clicked a button I WANT the VB app to copy the entire open page in the instance of IE that executed my app, and write that 'page' out to a .txt file.
I was thinking that all I needed to do was to select the entire open page, copy it to the clipboard and then I could ( I think ) read it back, line by line into the VB app and write that line by line out to a text file.
Does any of this sound feasable?
I've seen MSDN's code for BHO's but thats only C++.
I have been trying to use the following code, but I have no info / idea about what I'm really doing...
...I'm guessing at what to type after the ie.doc. statement and trying to compile it...
Dim SWs As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer
Private Sub Form_Load()
Dim Doc
List1.Clear
List2.Clear
For Each IE In SWs
List1.AddItem IE.LocationName
Set Doc = IE.Document
If TypeOf Doc Is HTMLDocument Then
'if this is an HTML page, display the title
'may or may not be the same as LocationName
Text1.Text = Doc.Title <= INSTEAD OF TITLE WHAT ELSE
CAN I PUT HERE I.E. CAN I
PUT .PAGE TO SELECT / SHOW
THE PAGE?
End If
Next
End Sub
I'm relatively new to VB 6 (I don't understand COM, ActiveX, Type Libraries etc...) and all I have in terms of manuals / tutorials / examples is the MSDN Library CD's and whatever I can find on the 'net.
I hope you can help or at least tell me what I need to learn / read / understand to work all this out for myself.
Thanks
P.S. I'm thinking of buying / upgrading to VB .Net. Is what I'm trying to do MUCH simpler in that, if so, should I forget trying to learn VB6 and go straight into VB.Net?
Xena

