I have a Windows form program that gets some XML data from the cloud (more on this below), processes in, then modifies the form to display the data (via the Paint event which makes sense and which should be triggered by my call to Me.Refresh). For debugging purposes, I included a line of code that dumps the XML to a file.

Here’s the problem: When I run the program and tell it to read the XML data from the file, the program runs just fine. However, when I tell the program to get the data from the cloud, the Paint event handler is never called. I know this because I put a break point in the function and the break point is never hit. However, a Paint event, for a PictureBox element, is being called properly via a Refresh command.

To get the XML data (simplified to remove error catching), my code looks like this:
Dim xmlDataClient As HttpClient = New HttpClient()
Dim siteURL As String = "<URL>"
Dim responseBody As String = ""

Dim response As HttpResponseMessage = Await xmlDataClient.GetAsync(siteURL)
responseBody = Await response.Content.ReadAsStringAsync()
Since this is the only difference between the get versus read, I suspect that there is something happening here that I am not doing correctly. I suspect that the Await need to be 'stopped', but have no idea what do to. Interestingly, in an earlier version of the program, when the images were in PictureBox elements, this was not an issue.