[转载]vb.net获取web验证码在winform中显示的简单示例 – Konimeter – 博客园.
Private Sub GetImage() Try Dim request As HttpWebRequest = WebRequest.Create("http://www.junjv.com/GetImage") request.Timeout = 20000 request.ServicePoint.ConnectionLimit = 100 request.ReadWriteTimeout = 30000 request.Method = "GET" Dim response As HttpWebResponse = request.GetResponse() If (response.StatusCode <> HttpStatusCode.OK) Then Exit Sub End If Dim resStream As Stream = response.GetResponseStream() PictureBox1.Image = New Bitmap(resStream) '这个是winform中的控件 Catch ex As Exception MsgBox(ex.Message) End Try End Sub