Click here to Skip to main content
15,395,065 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help on chat between two computers Pin
Richard Deeming29-Jan-14 7:22
mveRichard Deeming29-Jan-14 7:22 
GeneralRe: Need help on chat between two computers Pin
OriginalGriff29-Jan-14 8:01
mveOriginalGriff29-Jan-14 8:01 
GeneralRe: Need help on chat between two computers Pin
larsp77729-Jan-14 10:28
Memberlarsp77729-Jan-14 10:28 
GeneralRe: Need help on chat between two computers Pin
larsp77730-Jan-14 1:48
Memberlarsp77730-Jan-14 1:48 
GeneralRe: Need help on chat between two computers Pin
Richard Deeming30-Jan-14 2:02
mveRichard Deeming30-Jan-14 2:02 
GeneralRe: Need help on chat between two computers Pin
larsp77730-Jan-14 2:06
Memberlarsp77730-Jan-14 2:06 
GeneralRe: Need help on chat between two computers Pin
larsp77729-Jan-14 6:15
Memberlarsp77729-Jan-14 6:15 
GeneralRe: Need help on chat between two computers Pin
Richard Deeming29-Jan-14 3:19
mveRichard Deeming29-Jan-14 3:19 
larsp777 wrote:
listMessage.Items.Add("Friend: " + receivedMessage);

I'm guessing that's the line that's causing the problem. The callback method will be called on a background thread; you will need to use InvokeRequired and Invoke to get back to the UI thread when you want to access the form's controls.
C#
Invoke((Func<object, int>)listMessage.Items.Add, "Friend: " + receivedMessage);




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Need help on chat between two computers Pin
larsp77729-Jan-14 5:07
Memberlarsp77729-Jan-14 5:07 
GeneralRe: Need help on chat between two computers Pin
Rahul VB29-Jan-14 20:39
professionalRahul VB29-Jan-14 20:39 
GeneralRe: Need help on chat between two computers Pin
OriginalGriff29-Jan-14 22:40
mveOriginalGriff29-Jan-14 22:40 
AnswerRe: Need help on chat between two computers Pin
larsp77729-Jan-14 10:35
Memberlarsp77729-Jan-14 10:35 
QuestionValidation and Data storing in one step Pin
nitin_ion28-Jan-14 17:47
Membernitin_ion28-Jan-14 17:47 
AnswerRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter28-Jan-14 20:17
professionalKornfeld Eliyahu Peter28-Jan-14 20:17 
GeneralRe: Validation and Data storing in one step Pin
nitin_ion28-Jan-14 20:27
Membernitin_ion28-Jan-14 20:27 
GeneralRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter28-Jan-14 20:31
professionalKornfeld Eliyahu Peter28-Jan-14 20:31 
GeneralRe: Validation and Data storing in one step Pin
nitin_ion28-Jan-14 20:38
Membernitin_ion28-Jan-14 20:38 
GeneralRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter28-Jan-14 20:41
professionalKornfeld Eliyahu Peter28-Jan-14 20:41 
GeneralRe: Validation and Data storing in one step Pin
nitin_ion28-Jan-14 20:43
Membernitin_ion28-Jan-14 20:43 
GeneralRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter28-Jan-14 20:45
professionalKornfeld Eliyahu Peter28-Jan-14 20:45 
GeneralRe: Validation and Data storing in one step Pin
nitin_ion28-Jan-14 20:46
Membernitin_ion28-Jan-14 20:46 
GeneralRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter28-Jan-14 20:50
professionalKornfeld Eliyahu Peter28-Jan-14 20:50 
GeneralRe: Validation and Data storing in one step Pin
nitin_ion28-Jan-14 23:18
Membernitin_ion28-Jan-14 23:18 
AnswerRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter28-Jan-14 23:21
professionalKornfeld Eliyahu Peter28-Jan-14 23:21 
GeneralRe: Validation and Data storing in one step Pin
nitin_ion28-Jan-14 23:22
Membernitin_ion28-Jan-14 23:22 

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.