Information Technology Reference
In-Depth Information
myTCPClient.GetData str2 'incoming data (new data)
str = str1 + str2 'total data to display
ShowText.Text = str 'display to ShowText
End Sub
Private Sub AddressIP_Click()
'Choose IP Address
myTCPClient.RemoteHost = AddressIP.Text
End Sub
Private Sub AddressIP_Change()
'Enter IP or DNS address
myTCPClient.RemoteHost = AddressIP.Text
End Sub
Private Sub AddressPort_Change()
'Change port number directly in the AddressPort box (manually)
myTCPClient.RemotePort = AddressPort.Text
End Sub
Private Sub CloseC_Click()
'Return to main menu
ChoiceSC.Show
End Sub
Private Sub SendTextData_KeyPress(KeyAscii As Integer)
'When you press the ENTER key the contain of the top box is sent
If KeyAscii = 13 Then
myTCPClient.SendData SendTextData.Text
SendTextData.Text = ""
End If
End Sub
J.2 My server (myServer.frm)
VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "mswinsck.ocx"
Begin VB.Form myServer
Caption = "Server Application"
ClientHeight = 3810
ClientLeft = 60
ClientTop = 345
ClientWidth = 3840
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3810
ScaleWidth = 3840
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton DisConnect
Caption = "Disconnect"
Height = 375
Left = 240
TabIndex = 7
Top = 3120
Width = 1335
End
Begin VB.TextBox ConnectionState
Search WWH ::




Custom Search