Private Sub Form_Load()
If App.PrevInstance = True Then
MsgBox "程序已经运行!", 64
End
End If
Check2.Value = 1
On Error GoTo one
Dim str As String
Open ".\user.txt" For Input As #1
Do Until EOF(1)
Line Input #1, str
List1.AddItem (Mid(str, 1, Int(Len(str) - 1)))
Loop
Close #1
one:
On Error GoTo err
With Winsock1
.Protocol = sckUDPProtocol
.RemotePort = 2000
.Bind 2000, .LocalIP
End With
err:
If Error <> "" Then MsgBox "初始化错误!可能端口在使用中!", 32
End Sub
运行时提示,“运行时错误'2'”,不知道是什么原因,昨天还能运行,今天就不行了,能编译成exe,运行时也提示同样的错误!
If App.PrevInstance = True Then
MsgBox "程序已经运行!", 64
End
End If
Check2.Value = 1
On Error GoTo one
Dim str As String
Open ".\user.txt" For Input As #1
Do Until EOF(1)
Line Input #1, str
List1.AddItem (Mid(str, 1, Int(Len(str) - 1)))
Loop
Close #1
one:
On Error GoTo err
With Winsock1
.Protocol = sckUDPProtocol
.RemotePort = 2000
.Bind 2000, .LocalIP
End With
err:
If Error <> "" Then MsgBox "初始化错误!可能端口在使用中!", 32
End Sub
运行时提示,“运行时错误'2'”,不知道是什么原因,昨天还能运行,今天就不行了,能编译成exe,运行时也提示同样的错误!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货