Click here to Skip to main content
15,905,682 members
Home / Discussions / C#
   

C#

 
Questionhow to restrict only one instance to run at a time on one machine Pin
prasadbuddhika3-Jan-09 17:36
prasadbuddhika3-Jan-09 17:36 
AnswerRe: how to restrict only one instance to run at a time on one machine Pin
N a v a n e e t h3-Jan-09 18:06
N a v a n e e t h3-Jan-09 18:06 
GeneralRe: how to restrict only one instance to run at a time on one machine Pin
prasadbuddhika3-Jan-09 18:50
prasadbuddhika3-Jan-09 18:50 
GeneralRe: how to restrict only one instance to run at a time on one machine Pin
N a v a n e e t h3-Jan-09 19:42
N a v a n e e t h3-Jan-09 19:42 
QuestionRounding a float to the nearest int Pin
Tony Pottier3-Jan-09 13:38
Tony Pottier3-Jan-09 13:38 
AnswerRe: Rounding a float to the nearest int Pin
PIEBALDconsult3-Jan-09 13:46
mvePIEBALDconsult3-Jan-09 13:46 
QuestionRemote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 8:05
ZarazaPhd3-Jan-09 8:05 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 8:51
sitebuilderLuc Pattyn3-Jan-09 8:51 
Hi,

the methods that get called by the other side are bound to be asynchronous with respect to your main
thread, hence they execute on a different thread; the same is true for most timers, for serial port
receive, etc.

And you are not allowed to touch any Controls (accessing properties, calling methods) from any thread
but the one that created the Control, which normally is the main or GUI thread.

To solve the problem the Control class offers InvokeRequired property and Invoke method.
If you are unfamiliar with them, look them up, there are plenty of examples around.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

Love, happiness and fewer bugs for 2009!


GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 9:10
ZarazaPhd3-Jan-09 9:10 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 9:44
sitebuilderLuc Pattyn3-Jan-09 9:44 
GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 10:59
ZarazaPhd3-Jan-09 10:59 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 11:34
sitebuilderLuc Pattyn3-Jan-09 11:34 
GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd3-Jan-09 11:47
ZarazaPhd3-Jan-09 11:47 
GeneralRe: Remote event update RichTextBox problem Pin
Luc Pattyn3-Jan-09 12:20
sitebuilderLuc Pattyn3-Jan-09 12:20 
GeneralRe: Remote event update RichTextBox problem Pin
ZarazaPhd4-Jan-09 3:04
ZarazaPhd4-Jan-09 3:04 
QuestionUsing Type and ConstructorInfo: Can't understand why this doesn't work... Pin
pikmindoctor3-Jan-09 4:19
pikmindoctor3-Jan-09 4:19 
AnswerRe: Using Type and ConstructorInfo: Can't understand why this doesn't work... Pin
User 66583-Jan-09 4:26
User 66583-Jan-09 4:26 
GeneralRe: Using Type and ConstructorInfo: Can't understand why this doesn't work... Pin
Luc Pattyn3-Jan-09 4:28
sitebuilderLuc Pattyn3-Jan-09 4:28 
QuestionQuestion on string.Format(...) Pin
Charith Jayasundara3-Jan-09 4:08
Charith Jayasundara3-Jan-09 4:08 
AnswerRe: Question on string.Format(...) Pin
Colin Angus Mackay3-Jan-09 5:21
Colin Angus Mackay3-Jan-09 5:21 
GeneralRe: Question on string.Format(...) Pin
Charith Jayasundara3-Jan-09 6:17
Charith Jayasundara3-Jan-09 6:17 
GeneralRe: Question on string.Format(...) Pin
Colin Angus Mackay3-Jan-09 6:32
Colin Angus Mackay3-Jan-09 6:32 
GeneralRe: Question on string.Format(...) Pin
Charith Jayasundara3-Jan-09 8:31
Charith Jayasundara3-Jan-09 8:31 
QuestionAutoincrement ID field in a xsd Pin
tharkaway3-Jan-09 2:50
tharkaway3-Jan-09 2:50 
QuestionHow to check whether network busy or not? Pin
George_George3-Jan-09 1:20
George_George3-Jan-09 1:20 

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.