Thanx, but I am already doing that, except that I am not inserting the
WebBrowser control, but I am creating it dynamically. The event handlers
exist in my document. In fact, as far as I could tell, these were working
while I was in VS 2003 environment, but not in VS 2005 which I am using now.
Thanx,
--
Anil Gupte
www.keeninc.net www.icinema.com www.wizo.tv
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:fe******** *************** ***********@k37 g2000hsf.google groups.com...
On Jun 9, 9:52 am, "Anil Gupe/keen inc." <anil-l...@icinema.co m>
wrote:
I used the following to create a new Web Browser Control
Dim WithEvents webBrowserConte nt As New AxSHDocVw.AxWeb Browser
It works fine for some things for example
webBrowserConte nt.Navigate(url ) works. However, the DocumentComplet e,
NavigateComplet e2 and a couple of other events I tried do not trigger when
the user navigates in that WebBrowser Control - what am I doing wrong?
Thanx,
--
Anil Guptewww.keenin c.netwww.icinem a.comwww.wizo.t v
Anil,
You can use Webbrowser control, wrapped version of ShDocVw and
available in your toolbox. After placing it on your form, double-click
on it and the such events can be created like this:
' Document completed event
Private Sub WebBrowser1_Doc umentCompleted( ByVal sender As
System.Object, ByVal e As
System.Windows. Forms.WebBrowse rDocumentComple tedEventArgs) Handles
WebBrowser1.Doc umentCompleted
' Code here
End Sub
'Navigated event
Private Sub WebBrowser1_Nav igated(ByVal sender As System.Object, ByVal
e As System.Windows. Forms.WebBrowse rNavigatedEvent Args) Handles
WebBrowser1.Nav igated
' Code here
End Sub
and you can find more by seeing events after "handles" clause.
Hope this helps,
Onur Güzel