Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. leWinsock Control Array

leWinsock Control Array

Scheduled Pinned Locked Moved Visual Basic
helpdata-structuresregex
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mohan_balal
    wrote on last edited by
    #1

    I create control array of Winsock control, while compile it Gives an Error: This is my code in Form Load event rs.Open "select * from port_table", cn, adOpenKeyset, adLockOptimistic While Not rs.EOF List1.AddItem rs!portno rs.MoveNext Wend rs.Close Dim cnt cnt = 0 For i = 1 To List1.ListCount Load Winsock1(i) Winsock1(i).LocalPort = List1.List(cnt) Winsock1(i).Listen MsgBox List1.List(cnt) cnt = cnt + 1 Next In this line It gives Error: Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Error: Compile Error: Procedure declaration error as type doesn't match description of event or procedure having the same name ------------------------- I want to open and Listen all the Ports which are store in the (Port_table) table. Then communicate with all the Ports. Please Help me as soon as Possible. Thanks Mohan :confused: Mohan Balal

    J 1 Reply Last reply
    0
    • M mohan_balal

      I create control array of Winsock control, while compile it Gives an Error: This is my code in Form Load event rs.Open "select * from port_table", cn, adOpenKeyset, adLockOptimistic While Not rs.EOF List1.AddItem rs!portno rs.MoveNext Wend rs.Close Dim cnt cnt = 0 For i = 1 To List1.ListCount Load Winsock1(i) Winsock1(i).LocalPort = List1.List(cnt) Winsock1(i).Listen MsgBox List1.List(cnt) cnt = cnt + 1 Next In this line It gives Error: Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Error: Compile Error: Procedure declaration error as type doesn't match description of event or procedure having the same name ------------------------- I want to open and Listen all the Ports which are store in the (Port_table) table. Then communicate with all the Ports. Please Help me as soon as Possible. Thanks Mohan :confused: Mohan Balal

      J Offline
      J Offline
      Jose Cezar S Ynion
      wrote on last edited by
      #2

      Set the index property of your winsock control to 0 then modify the function delaration with this one: Private Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups