Results 1 to 28 of 28

Thread: [RESOLVED] Winsock wont connect (Resolved)

Threaded View

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Winsock wont connect (Resolved)

    I am having a problem with winsock in my app, I can connect to the sever when I test it using my demo but when I use the actual application it wont connect. Below is the code I am using to connect to the server:

    VB Code:
    1. Private Sub Command2_Click()
    2. messcon.Connect txtConnect, 7000
    3. If messcon.State = sckConnected Then
    4. Command2.Enabled = False
    5. Else
    6. MsgBox (LoadResString(68 + i))
    7. End If
    8. End Sub

    I keep getting the please connect message showing up. It worked find before I added this code:

    VB Code:
    1. Private Sub Command3_Click()
    2. If Not txtAttachment.Text = "" Then
    3. NF = FreeFile
    4. Open cmdAttach.FileName For Input As #NF
    5. Input #NF, data
    6. fname = cmdAttach.FileTitle
    7. messcon.SendData "|DATA|" & data & fname
    8. Close #NF
    9. End If
    10. End Sub
    11.  
    12. Private Sub Messlis_DataArrival(Index As Integer, ByVal bytesTotal As Long)
    13. If InStr(1, str, "|DATA|") <> 0 Then
    14.  NF = FreeFile
    15.  MkDir (App.Path & "\Received Files\")
    16.  Open App.Path & "\Received Files\" & fname For Output As #NF
    17.  Print #NF, data
    18.  Close #NF
    19.  End If
    20. End Sub

    TIA

    Nightwalker83
    Last edited by Nightwalker83; Mar 13th, 2003 at 06:30 PM.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

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