惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
雷峰网
雷峰网
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
MongoDB | Blog
MongoDB | Blog

博客园 - 岳洋

关键词:vb.net 扑克 cards.dll 网上较好的提取链接的正则表达式 一个读取网页源代码的小程序 file manager 0.1 circleliner阅读笔记 panel的使用 用于学习鼠标作图的网页。 写文件时换行的问题[转载] by 東風耐候 - 岳洋 用旧方法文件读写 - 岳洋 - 博客园 Birthday Reminder Framework 1.1版本 Birthday Reminder (R Edition) ver1.0 build 050813正式发布! 050627ReciteDemo0.2 050626诗歌背诵程序demo 050615 B-A-M v1.0源代码 050615 Bact.-Anti-Med.ver1.0正式发布! 新建一个按钮至少需要做的事情…… 我决定不再和窗体设计器争生意了! 050614Bact.-Anti-Med.v0.3最新更新 按钮的突然消失!(小记一次编程失误)
下载网页源代码的程序
岳洋 · 2006-02-07 · via 博客园 - 岳洋

刚才那个是不行的,只读第一个包的网页源代码……
这个是用webclient的,有点.net的感觉了。

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        
Dim data As String
        
Dim data2 As String
        
Try
            wc 
= New System.Net.WebClient()
            
If Not (TextBox1.Text Like "http://*"Then
                TextBox1.Text 
= "http://" + TextBox1.Text
            
End If
            b 
= wc.DownloadData(TextBox1.Text)
            data 
= System.Text.Encoding.Default.GetString(b)
            
'strm = wc.OpenRead(TextBox1.Text)
            'sr = New System.IO.StreamReader(strm)
            'data = sr.ReadToEnd.ToString
            data2 = data.Replace(ControlChars.Lf, ControlChars.CrLf)
            RichTextBox1.Text 
= data2
        
Catch ex As Exception
            
MsgBox(ex.ToString)
        
End Try
    
End Sub

可以看出我本来想用stream的,最终还是放弃了,是什么问题我以后会找一下。