Results 1 to 7 of 7

Thread: *** RESOLVED *** Implementing a method

Threaded View

  1. #1

    Thread Starter
    Addicted Member finn0013's Avatar
    Join Date
    Jan 2001
    Location
    Charleston, SC
    Posts
    222

    Resolved *** RESOLVED *** Implementing a method

    I am new to C# and am having trouble translating the following line from VB.net to C#:

    VB Code:
    1. Public Sub BeforeNavigate2(ByVal pDisp As Object, ByRef URL As String, ByRef flags As Object, ByRef targetFrameName As String, ByRef postData As Object, ByRef headers As String, ByRef cancel As Boolean) Implements DWebBrowserEvents2.BeforeNavigate2
    2.     ' Do stuff...
    3. End Sub

    What I have so far is:
    VB Code:
    1. public void BeforeNavigate2(Object pDisp, String URL, Object flags, String targetFrameName, Object postData, String headers) {  // Do stuff... }

    But when compiling, I get the following error:
    Error 1 'ModifiableWebBrowser.WebBrowserExtendedEvents' does not implement interface member 'ModifiableWebBrowser.DWebBrowserEvents2.BeforeNavigate2(object, string, object, string, object, string)'. 'ModifiableWebBrowser.WebBrowserExtendedEvents.BeforeNavigate2(object, string, object, string, object, string)' is either static, not public, or has the wrong return type. C:\Documents and Settings\jmcdonald\My Documents\Visual Studio 2005\Projects\WindowsApplication3\WindowsApplication3\ModifiableWebBrowser.cs 81 18 WindowsApplication3


    I know that I need to tell the app that this method is implementing the DWebBrowserEvents2.BeforeNavigate2 method, but can not figure out the syntax. I have searched for the syntax for this but must be searching by the wrong criteria as I have not found anything yet. Help?
    Last edited by finn0013; Aug 14th, 2006 at 09:52 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width