Click here to Skip to main content
15,884,088 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help on chat between two computers Pin
larsp77730-Jan-14 1:48
larsp77730-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
larsp77730-Jan-14 2:06 
GeneralRe: Need help on chat between two computers Pin
larsp77729-Jan-14 6:15
larsp77729-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 
GeneralRe: Need help on chat between two computers Pin
larsp77729-Jan-14 5:07
larsp77729-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 
Sorry Rahul, but it's a huge subject - I couldn't begin to do it justice in a small text box! Laugh | :laugh:
There are some good tutorials out there which explain threading and the UI pretty well:
http://stuff.seans.com/2009/05/21/net-basics-do-work-in-background-thread-to-keep-gui-responsive/[^] (Backgound and why to thread)

http://www.dreamincode.net/forums/topic/246911-c%23-multi-threading-in-a-gui-environment/[^] (Fairly advanced)

But basically when you start to use multiple threads you can't touch any controls, except from the thread that created them - which is called the UI thread (for User Interface) and is the original thread the form started on. If you try, you will get a "cross-threading" error telling you not to do that. The only way to get round it is to Invoke the control - which basically requests the UI thread to do the work for you.

Have a look at the BackgroundWorker thread - it provides a way to update the display without invoking via the ProgressChanged event, which is executed on the original thread.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

AnswerRe: Need help on chat between two computers Pin
larsp77729-Jan-14 10:35
larsp77729-Jan-14 10:35 
QuestionValidation and Data storing in one step Pin
nitin_ion28-Jan-14 17:47
nitin_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
nitin_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
nitin_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
nitin_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
nitin_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
nitin_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
nitin_ion28-Jan-14 23:22 
GeneralRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter28-Jan-14 23:31
professionalKornfeld Eliyahu Peter28-Jan-14 23:31 
GeneralRe: Validation and Data storing in one step Pin
nitin_ion28-Jan-14 23:37
nitin_ion28-Jan-14 23:37 
GeneralRe: Validation and Data storing in one step Pin
Kornfeld Eliyahu Peter29-Jan-14 0:16
professionalKornfeld Eliyahu Peter29-Jan-14 0:16 

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.