Click here to Skip to main content
15,896,915 members
Home / Discussions / C#
   

C#

 
GeneralRe: Issue with running .exe(compiled in 34 bit) in window7 64bit enviornment Pin
Alan N7-Jun-10 3:58
Alan N7-Jun-10 3:58 
QuestionNUnit and testing in Web Developer 2008 Express Pin
Bart Van Eyndhoven7-Jun-10 0:22
Bart Van Eyndhoven7-Jun-10 0:22 
QuestionInstall windows Service from ClickOnce Deployment Pin
Abdul Rahman Hamidy7-Jun-10 0:04
Abdul Rahman Hamidy7-Jun-10 0:04 
QuestionChild Form From its parent form Pin
Enobong Adahada6-Jun-10 22:05
Enobong Adahada6-Jun-10 22:05 
AnswerRe: Child Form From its parent form Pin
Łukasz Nowakowski6-Jun-10 22:22
Łukasz Nowakowski6-Jun-10 22:22 
AnswerRe: Child Form From its parent form Pin
Anshul R8-Jun-10 20:33
Anshul R8-Jun-10 20:33 
QuestionMultithreading Pin
peropata6-Jun-10 21:20
peropata6-Jun-10 21:20 
AnswerRe: Multithreading Pin
Luc Pattyn7-Jun-10 1:01
sitebuilderLuc Pattyn7-Jun-10 1:01 
Hi,

There basically are two schemes you have to choose from.

1.
if the timer is a Windows.Forms.Timer and your Tick handler is short (less than 10 msec), then everything should be OK. That requires there are no blocking I/O methods called. So when your peripheral needs 200 msec to perform a data acquisition, it would only work smoothly if that gets handled asynchronously, i.e. in one timer tick you issue a "start acquisition" command without waiting for the results; and in a different handler (or a later tick of the timer) you issue a "now deliver the available data" command.

2.
If the above is not possible, the alternative is to have a second thread that takes care of communicating with your peripheral and preparing the new data; it should then use the Control.InvokeRequired/Invoke pattern to update the GUI. See this little article[^].

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read formatted code with indentation, so please use PRE tags for code snippets.

I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).

modified on Monday, June 7, 2010 8:39 AM

QuestionSerial number in installer. Pin
MayukhSen6-Jun-10 20:52
MayukhSen6-Jun-10 20:52 
AnswerRe: Serial number in installer. Pin
Hristo-Bojilov6-Jun-10 21:24
Hristo-Bojilov6-Jun-10 21:24 
QuestionPDF to Tiff through C# Pin
mehrdadc486-Jun-10 18:24
mehrdadc486-Jun-10 18:24 
AnswerRe: PDF to Tiff through C# Pin
Abhinav S6-Jun-10 19:01
Abhinav S6-Jun-10 19:01 
QuestionOtions to store settings of application Pin
Hum Dum6-Jun-10 17:49
Hum Dum6-Jun-10 17:49 
AnswerRe: Otions to store settings of application Pin
Łukasz Nowakowski6-Jun-10 21:25
Łukasz Nowakowski6-Jun-10 21:25 
AnswerRe: Otions to store settings of application Pin
Peace ON6-Jun-10 22:24
Peace ON6-Jun-10 22:24 
AnswerRe: Otions to store settings of application Pin
Johnny J.6-Jun-10 22:31
professionalJohnny J.6-Jun-10 22:31 
AnswerRe: Otions to store settings of application Pin
PIEBALDconsult7-Jun-10 2:40
mvePIEBALDconsult7-Jun-10 2:40 
Questionflickers with draw plots from serial port ? Pin
Honeyboy_206-Jun-10 16:40
Honeyboy_206-Jun-10 16:40 
AnswerRe: flickers with draw plots from serial port ? Pin
Luc Pattyn6-Jun-10 16:57
sitebuilderLuc Pattyn6-Jun-10 16:57 
GeneralRe: flickers with draw plots from serial port ? Pin
Honeyboy_206-Jun-10 17:09
Honeyboy_206-Jun-10 17:09 
GeneralRe: flickers with draw plots from serial port ? Pin
Luc Pattyn6-Jun-10 17:19
sitebuilderLuc Pattyn6-Jun-10 17:19 
GeneralRe: flickers with draw plots from serial port ? Pin
Honeyboy_208-Jun-10 5:24
Honeyboy_208-Jun-10 5:24 
GeneralRe: flickers with draw plots from serial port ? Pin
Ravi Bhavnani6-Jun-10 17:30
professionalRavi Bhavnani6-Jun-10 17:30 
GeneralRe: flickers with draw plots from serial port ? Pin
Honeyboy_207-Jun-10 5:19
Honeyboy_207-Jun-10 5:19 
GeneralRe: flickers with draw plots from serial port ? Pin
Luc Pattyn8-Jun-10 6:28
sitebuilderLuc Pattyn8-Jun-10 6:28 

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.