Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get value from the listbox in Form2 to display in Form1 Textbox? Pin
Zar Ni25-Oct-09 17:28
Zar Ni25-Oct-09 17:28 
GeneralRe: How to get value from the listbox in Form2 to display in Form1 Textbox? Pin
N a v a n e e t h25-Oct-09 17:43
N a v a n e e t h25-Oct-09 17:43 
GeneralRe: How to get value from the listbox in Form2 to display in Form1 Textbox? Pin
Zar Ni25-Oct-09 18:19
Zar Ni25-Oct-09 18:19 
QuestionThread Safe Form Controls Pin
FJJCENTU25-Oct-09 12:15
FJJCENTU25-Oct-09 12:15 
AnswerRe: Thread Safe Form Controls Pin
Luc Pattyn25-Oct-09 12:25
sitebuilderLuc Pattyn25-Oct-09 12:25 
GeneralRe: Thread Safe Form Controls Pin
FJJCENTU25-Oct-09 13:12
FJJCENTU25-Oct-09 13:12 
GeneralRe: Thread Safe Form Controls Pin
Luc Pattyn25-Oct-09 13:44
sitebuilderLuc Pattyn25-Oct-09 13:44 
GeneralRe: Thread Safe Form Controls Pin
N a v a n e e t h25-Oct-09 20:14
N a v a n e e t h25-Oct-09 20:14 
AFAIK, you don't need Invoke/BeginInvoke always just for reading a control's properties from a worker thread. I believe it is only required when the call accesses control's handle. It is required in the case of ComboBox.
Thread worker = new Thread((ThreadStart)delegate
{
    string str = button1.Text; // Works well as Button.Text property is not using the button's handle
    string str1 = comboBox1.Text; // Error! Because it uses the handle.
});
worker.Start();
Do you think Invoke/BeginInvoke should be used always when reading properties of a control from a worker thread or use it only when it requires?

Any thoughts?

Best wishes,
Navaneeth

GeneralRe: Thread Safe Form Controls [modified] Pin
Luc Pattyn26-Oct-09 0:45
sitebuilderLuc Pattyn26-Oct-09 0:45 
GeneralRe: Thread Safe Form Controls Pin
N a v a n e e t h26-Oct-09 15:59
N a v a n e e t h26-Oct-09 15:59 
GeneralRe: Thread Safe Form Controls Pin
Luc Pattyn25-Oct-09 14:06
sitebuilderLuc Pattyn25-Oct-09 14:06 
QuestionCalling functions or checking objects of one form from another (MDI project) Pin
helkhoury25-Oct-09 8:32
helkhoury25-Oct-09 8:32 
AnswerRe: Calling functions or checking objects of one form from another (MDI project) Pin
DaveyM6925-Oct-09 9:06
professionalDaveyM6925-Oct-09 9:06 
AnswerRe: Calling functions or checking objects of one form from another (MDI project) [modified] Pin
Ekoj Lirpa25-Oct-09 9:42
Ekoj Lirpa25-Oct-09 9:42 
GeneralRe: Calling functions or checking objects of one form from another (MDI project) Pin
helkhoury25-Oct-09 10:40
helkhoury25-Oct-09 10:40 
GeneralRe: Calling functions or checking objects of one form from another (MDI project) Pin
helkhoury25-Oct-09 10:53
helkhoury25-Oct-09 10:53 
GeneralRe: Calling functions or checking objects of one form from another (MDI project) Pin
Ekoj Lirpa25-Oct-09 12:15
Ekoj Lirpa25-Oct-09 12:15 
Questionwho can help me? Pin
Abdaqader25-Oct-09 7:34
Abdaqader25-Oct-09 7:34 
AnswerRe: who can help me? Pin
Richard MacCutchan25-Oct-09 8:02
mveRichard MacCutchan25-Oct-09 8:02 
AnswerRe: who can help me? Pin
Abhishek Sur25-Oct-09 8:42
professionalAbhishek Sur25-Oct-09 8:42 
AnswerRe: who can help me? Pin
Christian Graus25-Oct-09 9:16
protectorChristian Graus25-Oct-09 9:16 
AnswerRe: who can help me? Pin
Pete O'Hanlon25-Oct-09 12:10
mvePete O'Hanlon25-Oct-09 12:10 
GeneralRe: who can help me? Pin
Gerry Schmitz25-Oct-09 17:13
mveGerry Schmitz25-Oct-09 17:13 
GeneralRe: who can help me? Pin
Mycroft Holmes25-Oct-09 18:11
professionalMycroft Holmes25-Oct-09 18:11 
Questionwho can help me Pin
Abdaqader25-Oct-09 7:34
Abdaqader25-Oct-09 7:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.