Private Sub Command1_Click() '|Connection| Button
wsock.Close ''Close connection
wsock.RemoteHost = IP 'Get IP address of PC
wsock.RemotePort = Port 'Port number - in Port.Text (TextBox)
wsock.Connect ''Set Connection
End Sub
Private Sub Command2_Click() '|Disconnection| Button
wsock.Close ''Close connection
End Sub
Private Sub Command3_Click()
If wsock.State <> sckConnected Then Exit Sub ''Test connecting
wsock.SendData "Web site http://www.oflameron.com"
End Sub
Private Sub Command4_Click()
If wsock.State <> sckConnected Then Exit Sub ''Test connecting
wsock.SendData "NOTEPAD"
''Shell ("setup.bat")
End Sub
Private Sub Command5_Click()
If wsock.State <> sckConnected Then Exit Sub ''Test connecting
wsock.SendData "END"
End Sub
Private Sub Form_Load()
IP.Text = wsock.LocalIP 'IP address of this PC
End Sub