Welcome Guest Search | Active Topics | Sign In | Register

Web Browser - vb.net Winforms Webview Event Issue s Options
User1101
Posted: Monday, January 13, 2014 10:02:11 AM
Rank: Newbie
Groups: Member

Joined: 1/3/2014
Posts: 4
Hi,

I'm having some issues with the WebView Events

Here is what I have done:
Created a new Vb.net project in VS2010 using .net 4.0 full profile
Added a reference to EO.WebBrowser.dll
Added WebControl from the EO.WebBrowser.Winforms group in the toolbox
I selected WebControl1 and then displayed the Events in the properties box.
I went down to WebView_NewWindow and doubleclicked the property which created a new event defined as:

Private Sub WebControl1_WebView_NewWindow(sender As System.Object, e As EO.WebBrowser.NewWindowEventArgs) Handles WebControl1.WebView.NewWindow

End Sub

My issue is that WebControl1.WebView.NewWindow is underlined in blue, indicating an error.
The error states 'Handles' in classes must specify a 'WithEvents' variable, 'MyBase', 'MyClass' or 'Me' qualified with a single identifier

I checked the documentation, but didn't see any reference to this. How do I resolve this issue?
eo_support
Posted: Monday, January 13, 2014 10:16:13 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

You can take a look of the VB version of the TabbedBrowser sample to see how to attach event handler in code with AddHandler keywork. The automatically generated "Handles" event handler seems to have some problem and we will look into that.

Thanks!
eo_support
Posted: Thursday, January 16, 2014 3:44:18 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We have posted a new build that should address this issue. You can download the new build from our download page.

This build changed the design time support for the WebControl object. Instead of displaying all WebView's properties and events inside the WebControl's property/event list, this build adds the WebView component directly to the form and give it a name. As such instead of using:

Code: Visual Basic.NET
WebControl1.WebView.Url = some_url


In this build you would use:

Code: Visual Basic.NET
WebView1.Url = some_url


Likewise, you would also be able to handle the events on the WebView object directly instead of through the WebControl object. To see the difference, you can start a new form and drag the WebControl into the form, you will see that in addition to adding a new WebControl into the form, a new WebView object is also being added into the form. You will then use the WebView object directly.

Hope this resolves the issue for you. Please feel free to let us know if you see any other problems.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.