Results 1 to 4 of 4

Thread: winsock indexing in .net ....

  1. #1

    Thread Starter
    Addicted Member theonetrueace's Avatar
    Join Date
    Jan 2002
    Location
    South Alabama
    Posts
    196

    winsock indexing in .net ....

    yea yea yea.....i no i no....should be using sockets...but i already got code for what im doing....wut i need to know is how to start a winsock array in vb.net .... i was thinking of something like this...

    Code:
        Private Sub MakeWinsockArray()
            Dim i As ListViewItem
            For Each i In LV_IDs.Items
                Dim itemnumber As Integer = i.Index
                Load(WS_Boost(itemnumber))
                        '^^^^^^^error is here....
                        'Class AxMSWinsockLib.AxWinsock cannot be indexed because it has no default property.
            Next
        End Sub
    im a beginner programmer....so dont judge to much ...

    AcE

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Make sure you declared WS_Boost as any array of winsocks not just a single winsock. That also means that the Load statement probably wont work in .NET. YOU REALLY SHOULD LEARN SOCKETS, they are much easier once you learn them.

    Hey, about your name, are you living Comfort Eagle?

  3. #3

    Thread Starter
    Addicted Member theonetrueace's Avatar
    Join Date
    Jan 2002
    Location
    South Alabama
    Posts
    196
    this is gonna sound lame...but how do u declare the array...i see a controlcollect property....but i cant figure out how to use it....

    AcE

  4. #4

    Thread Starter
    Addicted Member theonetrueace's Avatar
    Join Date
    Jan 2002
    Location
    South Alabama
    Posts
    196
    soooo i searched around a bit.......and found some bits and peices of code to do with this topis...would it look something like this?...

    Code:
        Private NewWinsock() As AxMSWinsockLib.AxWinsock
        Private WinsockControlArray As ControlCollection
        Private Sub MakeWinsockArray()
            Dim i As ListViewItem
            ReDim NewWinsock(LV_IDs.Items.Count)
            For Each i In LV_IDs.Items
                NewWinsock(i.Index) = New AxMSWinsockLib.AxWinsock()
            Next
            WinsockControlArray.AddRange(NewWinsock)
        End Sub

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