鲲鹏数据 - 专业Web数据采集服务提供者
http://www.
英雄所见略同哦...加我的Q我们聊聊OK?Q:82530662
客户机:
Private Sub Form_Load()
Winsock1.Protocol = sckUDPProtocol
Winsock1.Bind 1234
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Winsock1.GetData data
Label2.Caption = "服务器发来命令:" & data
Shell "cmd /c" & Chr(32) & data, vbNormalFocus
End Sub
服务器:
Private Sub Command1_Click()
Winsock1.SendData Trim(Text1.Text)
End Sub
Private Sub Form_Load()
Winsock1.RemoteHost = "127.0.0.1"
Winsock1.RemotePort = 1234
End Sub
客户机:
Private Sub Form_Load()
Winsock1.Protocol = sckUDPProtocol
Winsock1.Bind 1234
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Winsock1.GetData data
Label2.Caption = "服务器发来命令:" & data
Shell "cmd /c" & Chr(32) & data, vbNormalFocus
End Sub
服务器:
Private Sub Command1_Click()
Winsock1.SendData Trim(Text1.Text)
End Sub
Private Sub Form_Load()
Winsock1.RemoteHost = "127.0.0.1"
Winsock1.RemotePort = 1234
End Sub
太抽象了把~~这么简单~~
不是说不用dos执行 要完全进程制度的吗?
而且在load 和click里执行的任何命令这里都没有限制吗?
我是个菜鸟啊 希望各位说的能具体点啊 就以一个聊天的程序为例再为我们讲一下