Should I call displayfromHTTP on C# UI thread?

General discussions about GdPicture.NET.
Post Reply
EDSmith
Posts: 1
Joined: Thu May 15, 2014 8:19 pm

Should I call displayfromHTTP on C# UI thread?

Post by EDSmith » Thu May 15, 2014 8:36 pm

hi,
I am inheriting some c# winform application code + I find that displayFromHttp
(http://guides.gdpicture.com/content/GdP ... ring).html) is called on the UI thread in the application.
I find that if I delay the http request (using say fiddler) the application freezes untill the request is completed.
However if I do not call this update on the UI thread, I would end up updating the UI on a non-UI thread,
which is a C# no-no.
I assume the correct approach is to call displayFromHttp on a non UI thread and use the transferEnded event to
stimulate the update of the UI using ?

What is the best approach?
Is there sample code available for this?
Regards,
ED

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest