I have the following code to load a picture from the internet directly into my picturebox (from memory):
PictureBox1.Image = New Bitmap(New IO.MemoryStream(New Net.WebClient().DownloadData("LINK")))
The problem here is that my application freezes while the WebClient is downloading, so I thought I would use DownloadDataAsync
However, using this code doesnt work at all:
PictureBox1.Image = New Bitmap(New IO.MemoryStream(New Net.WebClient().DownloadDataAsync(New Uri("LINK"))))
It returns the error "Expression does not produce a value"