Click here to Skip to main content
15,887,585 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to select event of controls Pin
please help20-May-08 21:20
please help20-May-08 21:20 
GeneralRe: how to select event of controls Pin
Nouman Bhatti20-May-08 21:31
Nouman Bhatti20-May-08 21:31 
GeneralRe: how to select event of controls Pin
Christian Graus20-May-08 23:24
protectorChristian Graus20-May-08 23:24 
Questionproblem with SQLparameter Pin
Mr.Kode20-May-08 20:47
Mr.Kode20-May-08 20:47 
AnswerRe: problem with SQLparameter Pin
Nouman Bhatti20-May-08 21:34
Nouman Bhatti20-May-08 21:34 
QuestionConvert pdf file to image format Pin
needhi_p20-May-08 19:25
needhi_p20-May-08 19:25 
AnswerRe: Convert pdf file to image format Pin
Vikram A Punathambekar20-May-08 19:43
Vikram A Punathambekar20-May-08 19:43 
QuestionThreading problem [modified] Pin
MarkB77720-May-08 17:06
MarkB77720-May-08 17:06 
The code below is all in one class:

<br />
private string test = "nothing";<br />
<br />
public void deviceArrival(DeviceMonitorEvent dme)<br />
{<br />
this.test = "changed";<br />
}<br />


The event handler (method) is only run in the background thread, the instance variable is only used in my main thread.

When the event is fired, I want to change the value of 'test' in the main thread to "changed".

Currently it stays as "nothing" because I don't know how to cross-thread the two.

Any ideas?

Cheers,


modified on Wednesday, May 21, 2008 1:00 AM

QuestionRe: Threading problem Pin
Vikram A Punathambekar20-May-08 18:35
Vikram A Punathambekar20-May-08 18:35 
AnswerRe: Threading problem Pin
MarkB77720-May-08 18:47
MarkB77720-May-08 18:47 
GeneralRe: Threading problem Pin
Vikram A Punathambekar20-May-08 18:57
Vikram A Punathambekar20-May-08 18:57 
GeneralRe: Threading problem Pin
MarkB77720-May-08 19:03
MarkB77720-May-08 19:03 
GeneralRe: Threading problem Pin
Laddie20-May-08 19:01
Laddie20-May-08 19:01 
GeneralRe: Threading problem Pin
MarkB77720-May-08 19:07
MarkB77720-May-08 19:07 
AnswerRe: Threading problem Pin
Laddie20-May-08 18:47
Laddie20-May-08 18:47 
AnswerRe: Threading problem Pin
Mike Dimmick21-May-08 6:55
Mike Dimmick21-May-08 6:55 
GeneralRe: Threading problem Pin
MarkB77721-May-08 13:50
MarkB77721-May-08 13:50 
QuestionHandling Click and DoubleClick events differently Pin
Dr.Walt Fair, PE20-May-08 16:32
professionalDr.Walt Fair, PE20-May-08 16:32 
AnswerRe: Handling Click and DoubleClick events differently Pin
Vikram A Punathambekar20-May-08 18:40
Vikram A Punathambekar20-May-08 18:40 
GeneralRe: Handling Click and DoubleClick events differently Pin
Dr.Walt Fair, PE21-May-08 1:57
professionalDr.Walt Fair, PE21-May-08 1:57 
AnswerRe: Handling Click and DoubleClick events differently Pin
Atif Ali Bhatti20-May-08 19:30
Atif Ali Bhatti20-May-08 19:30 
GeneralRe: Handling Click and DoubleClick events differently Pin
Vikram A Punathambekar20-May-08 19:39
Vikram A Punathambekar20-May-08 19:39 
GeneralRe: Handling Click and DoubleClick events differently Pin
Atif Ali Bhatti20-May-08 19:50
Atif Ali Bhatti20-May-08 19:50 
GeneralRe: Handling Click and DoubleClick events differently Pin
Dr.Walt Fair, PE21-May-08 2:02
professionalDr.Walt Fair, PE21-May-08 2:02 
GeneralRe: Handling Click and DoubleClick events differently Pin
Dr.Walt Fair, PE21-May-08 17:27
professionalDr.Walt Fair, PE21-May-08 17:27 

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.