Results 1 to 2 of 2

Thread: Compile Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    5

    Compile Error

    Hey all I'm new here. Everytime I add a winsock to a form and try to compile it I get this error:

    Procedure decleration does not match description of event or procedure having the same name.

    It may have nothing to do with the winsock but that's when it appeard. Thanks for your help.

  2. #2
    Lively Member BradBrening's Avatar
    Join Date
    Oct 2001
    Location
    Gillespie, IL
    Posts
    102

    Re: Compile Error

    It sounds to me like you may have done something like the following:

    You place a Winsock control on your form then do a bunch of coding. Let's say you add some code to the DataArrival event:

    VB Code:
    1. Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    2.     Debug.Print bytesTotal
    3. End Sub

    Then, at some point you copy the Winsock control, paste the copy on your form - creating a control array. VB doesn't automatically update all your code blocks for the control events, so now the procedure declaration is wrong. It SHOULD look like this:

    VB Code:
    1. Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)
    2.     Debug.Print bytesTotal
    3. End Sub

    Note the addition of Index As Integer to the parameters. I bet this is where the problem is.
    Last edited by BradBrening; Oct 19th, 2005 at 09:03 PM.

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