NetClose Example for VB.NET
'LEADDICOMNet1 is a predefined LEADDicomNet object 
Private Sub LEADDICOMNet1_NetClose(ByVal hNet As Integer, ByVal nStatus 
 As Integer, ByVal hPeer As Integer) Handles LEADDICOMNet1.NetClose
   Dim out 
 As String
   'a connection is being closed 
   'display some information about the connection: 
   out = "Host: " & LEADDICOMNet1.GetHostAddress(hNet) 
   out = out & " Port: " & CStr(LEADDICOMNet1.GetHostPort(hNet)) 
   out = out & Chr(13) 
   out = out & "Peer: " & LEADDICOMNet1.GetPeerAddress(hNet) 
   out = out & " Port: " & CStr(LEADDICOMNet1.GetPeerPort(hNet)) 
   MessageBox.Show(out, "Connection Closed") 
End Sub