Hi,
I have a new WinForms project:
Visual Studio 2019 16.11.13
.NET 5
Windows 10
I want to load an image from a URL. When I run the app, nothing shows up. I've tried the following:
pic1.LoadAsync(url);
pic1.ImageLocation = url;
Both of these just result in a placeholder image coming back.
I've also tried downloading the stream - but it is getting stuck
using (WebClient webClient = new WebClient())
{
byte[] data = webClient.DownloadData(url);
using (MemoryStream mem = new MemoryStream(data))
{
using (var yourImage = Image.FromStream(mem))
{
}
}
}
Any ideas how to solve for this?
