Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T. July 2009 Entries
Winform Progress Bar Marquee Style Not Working
When trying to run a .Net winforms app with a progressbar on it, I found that if it was run from a non-standard class, the marquee style did not work. The reason was because we were running the app from our own loader class, instead of the usual winforms program.cs. This was because we were instatiating it from VB using COM interop - I thought this was the cause of the issue - but it turns out that this is not the case... The problem was that our own loader class did not enable the windows XP visual ......

Posted On Tuesday, July 21, 2009 9:19 PM

Async web service/WCF calls updating the UI on the UI thread (using WinForms)
To update the UI with values returned from an asynchronous WCF/web service call you need to make sure the coding updating the UI is running on the UI thread. Depending on how you've performed the async remote service call, often this is done on another thread - so when the handler executes upon completion of the call it is not on the UI thread and causes a threading exception. Within winforms, the solution is to use the Invoke() method eg the following method would be on your form or user control ......

Posted On Tuesday, July 7, 2009 9:56 PM

Copyright © Tim Huffam | Powered by: