I use a waiting form with an animated gif inside. The only way i've found to display this form with the animated gif "moving" is :
frmWaiting.Show()
Await Task.Run(Sub() AnyKindOfActionInASub)
frmWaiting.Close()
It works well but what if i need to call an async function returning an object instead of a simple sub? If i do :
Dim TwitterAccountToAdd As TwitterAccount
frmWaiting.Show()
TwitterAccountToAdd = Await nsTweetInvi.CallTwitterApi.GetApiTwitterDatasAccount(Me.txtTwitterId.Text)
frmWaiting.Close()
The animated gif is replaced by a white square.
Considering that GetApiTwitterDatasAccount return a Task(Of TwitterAccount), how can i do this?