Click here to Skip to main content
15,895,740 members
Home / Discussions / C#
   

C#

 
GeneralRe: Process id=0x748 (1864), Thread id = ... error! Pin
eyej4-Mar-06 3:58
eyej4-Mar-06 3:58 
GeneralRe: Process id=0x748 (1864), Thread id = ... error! Pin
mav.northwind4-Mar-06 4:57
mav.northwind4-Mar-06 4:57 
AnswerRe: Process id=0x748 (1864), Thread id = ... error! Pin
leppie4-Mar-06 4:59
leppie4-Mar-06 4:59 
QuestionWhen main thread working the Whole Form Freezes Pin
kourvoisier3-Mar-06 12:20
kourvoisier3-Mar-06 12:20 
AnswerRe: When main thread working the Whole Form Freezes Pin
Sean893-Mar-06 13:16
Sean893-Mar-06 13:16 
AnswerRe: When main thread working the Whole Form Freezes Pin
Office Lineman3-Mar-06 13:36
Office Lineman3-Mar-06 13:36 
GeneralRe: When main thread working the Whole Form Freezes Pin
Sean893-Mar-06 14:09
Sean893-Mar-06 14:09 
AnswerRe: When main thread working the Whole Form Freezes Pin
LighthouseJ3-Mar-06 16:11
LighthouseJ3-Mar-06 16:11 
I've run into this before. I ended up using creating a single delegate function called ThreadEvent which does everything and derived my own class called ThreadEventArgs from EventArgs to handle communicating what the thread is reporting.

Here's my delegate that handles whenever the thread sends any signal:

private void ThreadEventDelegate (object sender, ThreadEventArgs e)<br />
if (<control>.InvokeRequired)<br />
{<br />
  this.BeginInvoke(new ThreadEvent (ThreadEventDelegate), new Object[] { sender, e });<br />
}<br />
else<br />
{<br />
  <handle the event properly here><br />
}<br />


This is needed because the thread cannot change a control. What this does is it asks the control what unique thread number it is under. Whatever current thread is running is compared and if they are the same, then it doesn't need to invoke and it's safe to change the control. If they are different, the thread calls BeginInvoke to execute a new delegate asynchronously with the same data it was passed inside the thread it should have been.
QuestionRS232 Serial Class with .NET 2.0 Pin
econner3-Mar-06 12:13
econner3-Mar-06 12:13 
AnswerRe: RS232 Serial Class with .NET 2.0 Pin
Office Lineman3-Mar-06 13:39
Office Lineman3-Mar-06 13:39 
GeneralRe: RS232 Serial Class with .NET 2.0 Pin
econner4-Mar-06 2:02
econner4-Mar-06 2:02 
QuestionGraph ploting.. Pin
KORCARI3-Mar-06 10:20
KORCARI3-Mar-06 10:20 
AnswerRe: Graph ploting.. Pin
Curtis Schlak.3-Mar-06 15:04
Curtis Schlak.3-Mar-06 15:04 
QuestionCall C# DLL from (unmanaged) C++: question on passing out string parameter Pin
Koushik Biswas3-Mar-06 10:01
Koushik Biswas3-Mar-06 10:01 
AnswerRe: Call C# DLL from (unmanaged) C++: question on passing out string parameter Pin
Rob Graham3-Mar-06 10:25
Rob Graham3-Mar-06 10:25 
QuestionWant to draw continuous line based on a function Pin
...---...3-Mar-06 9:40
...---...3-Mar-06 9:40 
AnswerRe: Want to draw continuous line based on a function Pin
Robert Rohde3-Mar-06 10:24
Robert Rohde3-Mar-06 10:24 
QuestionRegular expressions in C# Pin
Martin233-Mar-06 9:35
Martin233-Mar-06 9:35 
AnswerRe: Regular expressions in C# Pin
Robert Rohde3-Mar-06 10:29
Robert Rohde3-Mar-06 10:29 
GeneralRe: Regular expressions in C# Pin
Martin233-Mar-06 10:52
Martin233-Mar-06 10:52 
QuestionRepaint Entire Component not Invalidate Pin
nickbungus3-Mar-06 8:03
nickbungus3-Mar-06 8:03 
AnswerRe: Repaint Entire Component not Invalidate Pin
Robert Rohde3-Mar-06 10:31
Robert Rohde3-Mar-06 10:31 
GeneralRe: Repaint Entire Component not Invalidate Pin
nickbungus3-Mar-06 22:17
nickbungus3-Mar-06 22:17 
Questionthe future of c#.net Pin
mostafa_h3-Mar-06 7:08
mostafa_h3-Mar-06 7:08 
AnswerRe: the future of c#.net Pin
User 66583-Mar-06 8:12
User 66583-Mar-06 8:12 

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.