Hi, I am a bit new to Visual Basic 6 and this forum. I was wondering if anyone can answer my question. Sorry if it has already been posted..

I want to create a program in VB6 that sends data to an IP Address. The only problem I have with this is that the data doesn't send correctly, and the server does not respond. After experimenting, I figured out that this is because the Open Socket ID used to send the data. In order to fix this problem, the current ID needs to be changed to the server's Open Socket ID. (For example, the program would send with 1260, when it should be 2199)

Here is the code I am using to connect to the server:

VB Code:
  1. Private Sub Form_Load()
  2. webBrowser.Navigate "<Removed for anti-advertising purposes>"
  3. Winsock1.RemoteHost = "62.27.32.29"
  4. Winsock1.RemotePort = 8080
  5. Winsock1.Connect
  6. End Sub

Is there a function that I can add to this that changes the Open Socket ID of the connection? Thanks in advance.