Calling a subroutine asynchronously and waiting for the response
I routinely need to call a stored procedure and wait 30 seconds for the response. The user is left wondering if there's anyone home. I can't open a 'please wait' dialog because the interface is frozen. Enter async.
Async calls have been around for a while, I see articles going back to 2009 and earlier, .NET 4.5 really brags about its multi-threading capabilities.
My needs are simpler. This article (written against .NET 3.5) is a short, simple block of code that show how to call a subroutine asynchronously and wait for the result.
In this example we have a second form called 'pleaseWait', it pops up and then disappears when the function returns