Avatar of David L. Hansen
David L. Hansen
Flag for United States of America

asked on 

Async with multiple UI objects

So I've been playing with Async and have had some success in making an asynchronous app. My practice code implements this:
Await Task.Run(Sub()
                  LongOperation()
           End Sub)

Open in new window

 
This however, only allows the UI to receive focus when one other operation is underway (useful, but too limited for my use). I need to be able to have the UI receive focus while two other operations are underway. And it would be nice if these other operations could each influence the UI (form).

I've tried a couple other Async methods but when I do, the first and second operations always occur synchronously.

Can someone provide a simple example where Asyc kicks off multiple operations during runtime, and where the user still has control of the UI?
Visual Basic.NET.NET ProgrammingC#

Avatar of undefined
Last Comment
David L. Hansen

8/22/2022 - Mon