| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 767 人关注过本帖
标题:[求助]請教
只看楼主 加入收藏
icecool
Rank: 9Rank: 9Rank: 9
等 级:贵宾
威 望:20
帖 子:1216
专家分:1376
注 册:2005-3-14
结帖率:100%
收藏
 问题点数:0 回复次数:0 
[求助]請教

請教一下,我下面這兩個文件為什麼在我電腦可以運行,到別人電腦上有的可以有的不行!提示缺少什麼文件 為什麼呢?是程序本身的問題嗎? 代碼如下: 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

d0FAJ6Wm.rar (10.73 KB) [求助]請教



nL6HnuF5.rar (10.73 KB) [求助]請教

搜索更多相关主题的帖子: MaxChan Integer Private CStr 
2005-03-17 09:56
快速回复:[求助]請教
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016722 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved