HttpWebRequest 抓圖片放在picturebox1
Dim url As String = "你要的網址"
Dim req As System.Net.HttpWebRequest = DirectCast(System.Net.WebRequest.Create(url), System.Net.HttpWebRequest)
Dim rsp As System.Net.HttpWebResponse = DirectCast(req.GetResponse(), System.Net.HttpWebResponse)
	Try
		If rsp.StatusCode = System.Net.HttpStatusCode.OK Then
			PictureBox1.Image = New Bitmap(rsp.GetResponseStream())
		End If
			Finally
		rsp.Close()
	End Try
arrow
arrow
    文章標籤
    picturebox1 HttpWebRequest
    全站熱搜
    創作者介紹
    創作者 JL8051 的頭像
    JL8051

    不會的就放這邊

    JL8051 發表在 痞客邦 留言(0) 人氣()