method Client.OpenConnection (host as String, [port as Long])
Opens a connection to a dict server

 TypeDescription 
   host as String A string expression that indicates the DICT server address. For instance: "dict.org"  
   port as Long A long expression that indicates the port used to communicate with the DICT server.  BY default, the port parameter is 2628, as described in the RFC 2229.  
 ReturnDescription 
  ConnectionA Connection object being created.  

Use the OpenConnection method to open a connection to a DICT server. 

The following sample prints the available dictionaries on the server: 

Private Sub Form_Load()
    Dim c As EXDICTCLIENTLibCtl.Connection
    Set c = Client1.OpenConnection("dict.org")
    If Not (c Is Nothing) Then
        Dim d As EXDICTCLIENTLibCtl.IDictionary
        For Each d In c.Dictionaries
            Debug.Print d.Name
        Next
        c.Close
    End If
End Sub

Send comments on this topic.
© 1999-2006 Exontrol Inc, Software. All rights reserved.