I'm using a gift inside of a picturebox while the form is loading. At every opening, it s putting a random image on the picturebox
PictureBox1.Image = My.Resources.ResourceManager.GetObject("load" & r.Next(1, 12))
The problem is that when I start the program, the gift is not really properly animated, kind of suffering some lag. I tried using backgroundworker with:
Public Async Function MyFunction() As Task
Await Task.Run(Sub()
PictureBox1.Image = My.Resources.ResourceManager.GetObject("load" & r.Next(1, 12))
End Sub)
End Function
and inside of form_load I'm calling the function:
Await MyFunction()
This unfortunately, doesn't solve the freezing of the gif. How can I solve this?