So, I have a problem in Visual Basic, I got this code that loads a picture.
WC.DownloadFileAsync(New Uri("picturelinkhere"), "c:\myfile.jpg")
After that I have a code that unloads the download button
Button1.Enabled = False
The thing is, I want to wait for the file to finish loading before turning Button1 back on.
I tried to use
System.Threading.Thread.Sleep(1000)
But the problem is that it makes progress in the program very lagged.
Any ideas?
source share