VB中怎么读取网页TXT文件,并且逐行显示在text中,与网页...'需要添加MicrosftInternetTrans

VB中怎么读取网页TXT文件,并且逐行显示在text中,与网页...'需要添加MicrosftInternetTrans
'需要添加Microsft Internet Transfer control 6.0部件
'程序例子======================================
'取消所有操作
Inet1.Cancel
'设定协议为 HTTP
Inet1.Protocol = icHTTP
'设定 URL 属性
Inet1.URL = "http://www.baidu.com" target="_blank">http://www.baidu.com"
'将读取的 HTML 数据附给string1
string1 = " "
string1 = Inet1.OpenURL
MsgBox (string1)
这个网页和TXT是2种文件吧,VB用OPEN语句可以打开文件读写。

← 上一篇: 下一篇: →