ADO DOT NET
Centurion
- Joined
- Dec 20, 2006
- Messages
- 160
Hi,
To make my form responsible, I use a 2nd thread to do a process.
If I try to get the text of a combo box on a form from within the thread, I get cross thread... exception.
That is normal, because combo box on the form is for another thread.
So I store the value of ComboBox.Text into a string variable and use that string in my thread and it works.
One thing is strange here:
When I try to get the checked value of radio button directly from within thread it works fine and I receive no exception.
> It means that I should continue to do what I do? OR it just works and is not recommended and I should the same as I do for combo box for radio button also?
(This applies to some other controls also)
Thanks
To make my form responsible, I use a 2nd thread to do a process.
If I try to get the text of a combo box on a form from within the thread, I get cross thread... exception.
That is normal, because combo box on the form is for another thread.
So I store the value of ComboBox.Text into a string variable and use that string in my thread and it works.
One thing is strange here:
When I try to get the checked value of radio button directly from within thread it works fine and I receive no exception.
> It means that I should continue to do what I do? OR it just works and is not recommended and I should the same as I do for combo box for radio button also?
(This applies to some other controls also)
Thanks