|
Private Sub cmdListen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdListen.Click If rs.Connected Then rs.Close_Connnection() End If Cursor.Current = Cursors.WaitCursor If bClient Then rs.Port_Number = Val(txtPort.Text) rs.Host_Name = txtServer.Text If rs.Connect_To_Server() <> 0 Then Cursor.Current = Cursors.Default MsgBox("Failed to connect " & rs.Error_Message) Else List_Bases_On_PPC() End If Else rs.Port_Number = Val(txtPort.Text) rs.Timeout = 60000 If rs.Listen_For_Connection() <> 0 Then Cursor.Current = Cursors.Default MsgBox("Failed " & rs.Error_Message) Else List_Bases_On_PPC() End If End If End Sub
|