請教一下,我下面這兩個文件為什麼在我電腦可以運行,到別人電腦上有的可以有的不行!提示缺少什麼文件 為什麼呢?是程序本身的問題嗎? 代碼如下: server: ----------------------------------------------------------------------------------------------------------------------- Private MaxChan As Integer Private Sub Command1_Click() host.Text = "ServerIP:" & CStr(sckListen.LocalIP) Dim i As Integer
MaxChan = 10
For i = 1 To MaxChan - 1
Load sckServer(i)
Next i
sckListen.LocalPort = port.Text
sckListen.Listen Command1.Enabled = False Command2.Visible = True End Sub
Private Sub Command2_Click() Me.Hide End Sub
Private Sub Form_Load()
End Sub
Private Sub port_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) port.ToolTipText = "You can change the port!" End Sub
Private Sub sckBusy_Close()
sckBusy.Close
End Sub
Private Sub sckBusy_DataArrival(ByVal bytesTotal As Long)
sckBusy.SendData "ªA°È¾¹¦£,½Ðµy¸Å³s±µ"
DoEvents
End Sub
Private Sub sckListen_ConnectionRequest(ByVal requestID As Long)
Dim i As Integer
For i = 0 To MaxChan - 1
If sckServer(i).State = 0 Then
Exit For
End If
Next i
If sckServer(i).State = 0 Then
sckServer(i).Accept requestID
Exit Sub
End If
sckBusy.Close
sckBusy.Accept requestID
End Sub
Private Sub sckListen_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
sckListen.Close
sckListen.LocalPort = port.Text
sckListen.Listen
End Sub
Private Sub sckServer_Close(Index As Integer)
sckServer(Index).Close
End Sub
Private Sub sckServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim s As String
Dim i As Integer
sckServer(Index).GetData s
If UCase(Left(Trim(s), 2)) = "PT" Then '§P?¬O§_?®¨®¨?¡A???¤è¦¡
If IsNumeric(Mid(Trim(s), 3, 1)) Then
i = Mid(Trim(s), 3, 1)
sckServer(i).SendData "user " & Index & " :" & Right(Trim(s), Len(Trim(s)) - 3)
DoEvents
End If
Else For i = 0 To MaxChan - 1
If sckServer(i).State = 7 Then
sckServer(i).SendData "user " & Index & " :" & Trim(s)
DoEvents
End If
Next i
End If
lstReceive.AddItem "user " & Index & " :" & Trim(s)
End Sub
Private Sub sckServer_Error(Index As Integer, ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
sckServer(Index).Close
End Sub