Results 1 to 4 of 4

Thread: Winsock questions.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Winsock questions.

    Hi, in my program im using the winsock control.
    If the program don't find any connection then i want a msgbox popping up and says: "There's no server running with either that IP / Port "
    Any suggestions ?

  2. #2
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Winsock questions.

    See what you get in the Error event when trying to connect to IP that doesn't exist.

  3. #3
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Winsock questions.

    Code:
    Private Sub Winsock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
     Winsock1.Close
    
     MsgBox "An Error Has Occured: Error Number = " & Number & ", Reason = " & Description
    End Sub

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Feb 2008
    Posts
    91

    Re: Winsock questions.

    Thank you so much, jmsrickland!
    So easy solution!

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