views:

218

answers:

2

Hello all, I am trying to debug my cute little application here and it won't let me :( When I click Debug, I get two errors, the first one is:

Error 1 The best overloaded method match for 'WindowsFormsApplication1.Form1.InitializeBrowserEvents(ExtendedWebBrowser)' has some invalid arguments

and the second:

Error 2 Argument '1': cannot convert from 'System.Windows.Forms.WebBrowser' to 'ExtendedWebBrowser'


Can anybody please help me solve this? I have no idea what this means.

I don't know if this is enough information for you so please do say if more info is needed and I will be glad to post more.

Thank you, Baeltazor.

Edit: I'm guessing that once I get rid of the second error, the first one will go away with it...

+2  A: 

It sounds like you have a method with this signature:

InitializeBrowserEvents(ExtendedWebBrowser x)

and you're trying to call it like this:

WebBrowser wb = new ExtendedWebBrowser (); // Or whatever
InitializeBrowserEvents(wb);

That's not going to work due to the type of the wb variable. You can either change the signature of InitializeBrowserEvents like this:

InitializeBrowserEvents(WebBrowser x)

or change the type of the argument you're trying to pass in. We can't tell which would be more appropriate without more information.

Jon Skeet
Thank you Mr. Skeet I will post additional code
baeltazor
A: 

Now, if you have linked to your other question and the respective answer it would be easier to assume that you actually placed a wrong control on the form in designer. You want to compile the project with ExtendedWebBrowser first, then add it to controls toolbox in the designer (if not done automatically) and replace your WebBrowser control with it.

Filip Navara