3
Answers

Threading with Windows Forms and HttpWebRequest

Sam

Sam

14y
3.4k
1

Greetings.
I've been researching this topic quite some time now, and haven't been able to figure it out at all.
Basically I have a Windows Forms C# (Visual Studio 2008 Express) application, that has two classes which make HttpWebRequests, which hang the whole application during the request.
What I would need to do is to allow the classes make the HttpWebRequests asycnhronously. The incoming data is parsed by a different function that takes parameters, but which is still inside the class. This function then calls the parent Windows Forms and adds a message to a TextBox.
I understand that adding text to a TextBox from two classes which are on separate threads can cause problems easily.
Any help is much appreciated. I've been stuck with similar problems for years now.
- Sam
Answers (3)