来源:www.cncfan.com | 2006-4-15 | (有3129人读过)
添加Transfer控件和WebBrowser控件,一个COMMAND和一个文本框。 参考以下代码: Private Sub Form_Load() WebBrowser1.Navigate "http://www.xxxx.com" End Sub
Private Sub Command1_Click() Dim HtmlByte() As Byte Dim sHtml As String,sTemp As String Inet1.URL=WebBrowser1.LocationURL HtmlByte()=Inet1.OpenURL Open App.Path+"\xxxx.htm" For Binary As #1 Put#1,,HtmlByte() Close #1 Open App.Path+"\xxxx.htm" For Input As #1 Do While Not EOF(1) Line Input #1,sTemp sHtml=sHtml+sTemp Loop Text1=sHtml Close #1 End Sub
|