Click here to Skip to main content
15,889,281 members
Home / Discussions / C#
   

C#

 
RantRe: How to make resistor color code Pin
Paladin200013-Feb-12 7:47
Paladin200013-Feb-12 7:47 
QuestionDigit Presents Windows phone application development contest Pin
PrateekN11-Feb-12 8:48
PrateekN11-Feb-12 8:48 
QuestionHow to Handle DatagridView's keydown event during editing of cell Pin
Nabawoka11-Feb-12 6:27
Nabawoka11-Feb-12 6:27 
AnswerRe: How to Handle DatagridView's keydown event during editing of cell Pin
Nabawoka11-Feb-12 20:57
Nabawoka11-Feb-12 20:57 
QuestionPlease help me understand serial communication Pin
turbosupramk311-Feb-12 5:52
turbosupramk311-Feb-12 5:52 
AnswerRe: Please help me understand serial communication Pin
OriginalGriff11-Feb-12 9:50
mveOriginalGriff11-Feb-12 9:50 
GeneralRe: Please help me understand serial communication Pin
turbosupramk311-Feb-12 11:09
turbosupramk311-Feb-12 11:09 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn11-Feb-12 11:31
sitebuilderLuc Pattyn11-Feb-12 11:31 
if the data is text and has a line delimiter (one or two characters that won't appear in the middle of the message), I would not use events at all; I'd rather use a Thread or a BackGroundWorker with an eternal loop, performing a SerialPort.ReadLine() and some output operations. That way you get rid of all worries about partial messages, and you don't need any additional buffering. You should set your definition of the message delimiter explicitly through SerialPort.NewLine[^]

BTW: If the delimiter could vary, say \n or \r\n, then you should set the SerialPort to look for the shorter one, and remove the other character from each line you get.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.

GeneralRe: Please help me understand serial communication Pin
turbosupramk311-Feb-12 11:56
turbosupramk311-Feb-12 11:56 
GeneralRe: Please help me understand serial communication Pin
turbosupramk311-Feb-12 15:29
turbosupramk311-Feb-12 15:29 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn11-Feb-12 15:51
sitebuilderLuc Pattyn11-Feb-12 15:51 
GeneralRe: Please help me understand serial communication Pin
turbosupramk311-Feb-12 22:31
turbosupramk311-Feb-12 22:31 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn11-Feb-12 23:34
sitebuilderLuc Pattyn11-Feb-12 23:34 
GeneralRe: Please help me understand serial communication Pin
turbosupramk312-Feb-12 4:11
turbosupramk312-Feb-12 4:11 
GeneralRe: Please help me understand serial communication Pin
Luc Pattyn12-Feb-12 10:43
sitebuilderLuc Pattyn12-Feb-12 10:43 
GeneralRe: Please help me understand serial communication Pin
turbosupramk312-Feb-12 11:06
turbosupramk312-Feb-12 11:06 
GeneralRe: Please help me understand serial communication Pin
turbosupramk312-Feb-12 16:40
turbosupramk312-Feb-12 16:40 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn13-Feb-12 3:10
sitebuilderLuc Pattyn13-Feb-12 3:10 
GeneralRe: Please help me understand serial communication Pin
turbosupramk313-Feb-12 3:18
turbosupramk313-Feb-12 3:18 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn13-Feb-12 3:31
sitebuilderLuc Pattyn13-Feb-12 3:31 
GeneralRe: Please help me understand serial communication Pin
turbosupramk313-Feb-12 4:00
turbosupramk313-Feb-12 4:00 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn13-Feb-12 4:12
sitebuilderLuc Pattyn13-Feb-12 4:12 
GeneralRe: Please help me understand serial communication Pin
turbosupramk313-Feb-12 4:18
turbosupramk313-Feb-12 4:18 
GeneralRe: Please help me understand serial communication Pin
turbosupramk317-Feb-12 11:52
turbosupramk317-Feb-12 11:52 
AnswerRe: Please help me understand serial communication Pin
Luc Pattyn17-Feb-12 17:36
sitebuilderLuc Pattyn17-Feb-12 17:36 

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.