vb inet控件中execute问题

inet1.executeurlputlocalfileremotefile这句中我想把urllocalfileremotefile做成控件的属性该怎么弄??那位大侠能详... inet1.execute url put localfile remotefile
这句中我想把url localfile remotefile 做成控件的属性该怎么弄??
那位大侠能详细讲讲么??在本地做测试的时候具体怎么设置这三个属性呢??
展开
 我来答
bater2000
2010-05-21 · TA获得超过1486个赞
知道小有建树答主
回答量:803
采纳率:0%
帮助的人:1095万
展开全部
1。先创建一个testClass类,从你问的问题看你好像还不会写类。类里面你做成方法(也就是函数还简单些)

2.然后类里大致是如下代码
private urlStr as string
private localfile as string
private remotefile as string

public sub setUrl(us as string)
urlstr = us
end sub
public sub setLocalFile(us as string)
localfile = us
end sub
public sub setRemoteFile(us as string)
remotefile = us
end sub

public sub start()
dim todo as inet
todo.execute urlStr put localfile remotefile
end sub

类写完以后,你其实可以把它连同inet控件封装成你的控件。那样只要拽入form窗体就像你用其它控件一样。如果只是类的话用法倒也不复杂

在form1里写如下代码
dim myinet as testClass
set myinet = new testClass

然后类的实例就可以这样用了,有代码提示的
myinet.setUrl "ftp://127.0.0.1"
myinet.setLocalFile "test1.txt"
myinet.setRemoteFile "test2.txt"
myinet.start
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式