Thanks for any help,
Aaron
As far as I can understand you have a problem with using IOleContainer in
CLR. If so here is interesting link [1]. There is "comsupport.cs" file
containing definition for IOleContainer interface. Hope it will help.
[1] http://www.itwriting.com/htmleditor/index.php
--
Best regards,
Vadim Melnik
_____________________
http://www.docsultant.com/
Thanks,
Aaron
-- Code snippet --
Dim Frames As IHTMLElementCollection = CType(Document,
IHTMLDocument3).getElementsByTagName("FRAME")
For Each Element In Frames
If TypeOf Element Is HTMLFrameElement Then
Dim Frame As HTMLFrameElement = CType(Element, HTMLFrameElement)
If TypeOf Frame.contentWindow Is IHTMLWindow2 Then
If TypeOf Frame.contentWindow.document Is IHTMLDocument3
Then
DocumentComplete(CType(Frame.contentWindow.document,
IHTMLDocument3))
End If
End If
End If
Next
Dim pContainer As IOleContainer
Dim pEnumerator As IEnumUnknown
Dim pUnk As IUnknown
Dim pBrowser As SHDocVw.IWebBrowser2
pContainer = wb
' Get an enumerator for the frames
If pContainer.EnumObjects(OLECONTF.OLECONTF_EMBEDDINGS, pEnumerator) = 0
Then
pContainer = Nothing
Dim pceltFetched As Integer = 0
' Enumerate and refresh all the frames
Do While pEnumerator.Next(1, pUnk, pceltFetched) = 0
Try
If IsNothing(pUnk) Then
Exit Do
End If
' Get the IWebBrowser2 interface
pBrowser = pUnk
Debug.WriteLine("Frame: " & pBrowser.LocationURL)
Catch ex As Exception
Debug.WriteLine(ex.Message)
End Try
pceltFetched = 0
Loop
pEnumerator = Nothing
End If
regards
Kushan Ratnayake
"Aaron Collver" <aaron_...@hotmail.com> wrote in message
news:utiyZq37...@TK2MSFTNGP10.phx.gbl...
Private Sub Browser__DocumentComplete(ByVal pDisp As Object, ByRef URL As
Object) Handles Browser_.DocumentComplete
If TypeOf pDisp Is InternetExplorer Then
With CType(pDisp, InternetExplorer).Document
'Code goes here
End With
End If
End Sub
Aaron
"Kushan Ratnayake" <nos...@invalid.com> wrote in message
news:eoaUZE47...@TK2MSFTNGP10.phx.gbl...
Aaron