Results 1 to 2 of 2

Thread: error 40020

  1. #1
    Join Date
    Feb 2009
    Posts
    29

    Unanswered: error 40020

    i am using Winsock control (sp6). I use commamdbutton named cmdConncet, on Form_Load i made
    Winsock1.LocalPort = 8080
    Winsock1.Listen

    then on cmdConnect_Click

    Winsock1.RemoteHost = "192.168.1.33"
    Winsock1.RemotePort = 8080
    Winsock1.Connect

    when i click cmdConncet I got Error message saying Invalid operation at current state. then it highlight Winsock1.RemoteHost = "192.168.1.33".

    i have tried to put the default gateway which is 192.168.1.1 and the address of my own 192.168.1.38 also tried to connect with computerName "Gail" still error 40020 occured.

  2. #2
    Join Date
    Feb 2009
    Posts
    29

    In Case someone has the same Problem

    In Case someone has the same Problem with mine.

    before declaring its RemoteHost, close it first

    winsock1.Close


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •