我可以通过 webclient 下载图片并在图片框上成功绘制。但我的问题是如何避免使用缓存系统从网络重新下载相同的图像。但我不想将它保存到我的牧群磁盘中。
我的代码是:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim wc As New System.Net.WebClient
Dim ImageInBytes() As Byte = wc.DownloadData(TextBox1.Text)
Dim ImageStream As New IO.MemoryStream(ImageInBytes)
PictureBox1.Image = New System.Drawing.Bitmap(ImageStream)
PictureBox1.Refresh()
End Sub