Results 1 to 5 of 5

Thread: Winsock

  1. #1

    Thread Starter
    Frenzied Member SomethinCool's Avatar
    Join Date
    Jan 2001
    Location
    Malvern, PA
    Posts
    1,407

    Red face Winsock

    Ok this is a no brainer and i've done it before but i am losing my mind. I totally forget how to do it so, can someone tell me how to connect to a server and port. thanks.

  2. #2
    Fanatic Member rudvs2's Avatar
    Join Date
    Mar 2001
    Location
    NZ
    Posts
    935
    VB Code:
    1. winsock1.Connect RemoteHostIp/Name, RemotePort

    Is that what you were after ??

  3. #3
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Put the winsock control on your form. Put the remote server, and port it, i.e(www.vbforums.com, port 80).

    Then in a command button, or what you'd prefer, put:
    Winsock1.Connect

    You can also use optional values for .Connect, for host, and IP.

  4. #4

    Thread Starter
    Frenzied Member SomethinCool's Avatar
    Join Date
    Jan 2001
    Location
    Malvern, PA
    Posts
    1,407

    Talking

    I did do that I did...

    Private Sub Command1_Click()
    Winsock1.Connect (somesite.something.com, 80)
    End Sub

    and it said i needed a = thing at the end and then if i take the ()'s away it says object required i think...

  5. #5

    Thread Starter
    Frenzied Member SomethinCool's Avatar
    Join Date
    Jan 2001
    Location
    Malvern, PA
    Posts
    1,407

    Angry

    ok i got it..i was really stupid..i had it in the winsock properties in VB and then i tried typing that code in. So , thanks anyway.

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