多谢诸位大虾。我下载了你们说的补丁,安装在用户的机器上,在设计界面中窗体上的inet控件显示出来,但运行程序,仍出运行时错误“无法连接远程主机”。而在操作系统的命令窗口中使用相同的地址,用户名和密码可以连接到FTP服务器上。同样的程序在我的机器上运行正常。大家还有高招吗。程序如下。大写的标识符为常量。 With transfer .URL = SERVER .Protocol = icFTP .AccessType = icUseDefault .USERNAME = USERNAME .PASSWORD = PASSWORD .RequestTimeout = 20 .RemotePort = 21 End With strFile = "c:\files\" If Path <> "" Then strFile = strFile & Path End If strFile = strFile & filename On Error GoTo tip If Dir(strFile) <> "" Then transfer.Execute transfer.URL, "put " & strFile & " " & Path & filename right1 = transfer.StillExecuting Do While right1 right1 = transfer.StillExecuting DoEvents Loop End If
简 介 很多网友反映安装完 VB6.0 后,引用其附带的控件会发生控件没有许可证的错误。MS 出的这个小程序就是帮助解决此问题的。
With transfer
.URL = SERVER
.Protocol = icFTP
.AccessType = icUseDefault
.USERNAME = USERNAME
.PASSWORD = PASSWORD
.RequestTimeout = 20
.RemotePort = 21
End With
strFile = "c:\files\"
If Path <> "" Then
strFile = strFile & Path
End If
strFile = strFile & filename
On Error GoTo tip
If Dir(strFile) <> "" Then
transfer.Execute transfer.URL, "put " & strFile & " " & Path & filename
right1 = transfer.StillExecuting
Do While right1
right1 = transfer.StillExecuting
DoEvents
Loop
End If