I have made an application for reading RSS and outputting it to labels, but what I am using is a Timer since I want to loop it.
I want as soon as my thread finishes, to wait 3 mins, then restart it.
What the thread/timer does it makes a panel with 2 labels, one for title and one for description, and in it, i put the rss item’s value.
The timer does what I need, but the control becomes unresponsive.
btw. I am using a custom control.
(Assuming 4.0) First, make this Extension Method in a Module in your project. This will handle cross thread UI operations.
Second, define the method that will be called by your thread which leverages the Extension Method to add controls to the form. Here is an example (Me in this case being the Form. You can add a form parameter (or some other type) to this method if you wish to pass one in to replace “Me”):
In your Timer Elapsed Event Handler:
Obviously, this isn’t exactly what you’re looking for, but may be enough of a lead for you. That extension method will work on more than just the Form Type.