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

C#

 
AnswerRe: reading from a dynamically created textarea Pin
Jason Gleim27-Aug-13 4:59
professionalJason Gleim27-Aug-13 4:59 
GeneralRe: reading from a dynamically created textarea Pin
Hbr_Tha_real28-Aug-13 1:53
Hbr_Tha_real28-Aug-13 1:53 
GeneralRe: reading from a dynamically created textarea Pin
Jason Gleim28-Aug-13 7:24
professionalJason Gleim28-Aug-13 7:24 
GeneralRe: reading from a dynamically created textarea Pin
Hbr_Tha_real28-Aug-13 11:19
Hbr_Tha_real28-Aug-13 11:19 
GeneralRe: reading from a dynamically created textarea Pin
Jason Gleim29-Aug-13 4:14
professionalJason Gleim29-Aug-13 4:14 
GeneralRe: reading from a dynamically created textarea Pin
Hbr_Tha_real29-Aug-13 12:16
Hbr_Tha_real29-Aug-13 12:16 
QuestionSerial Port reading char string Pin
Blubbo27-Aug-13 3:02
Blubbo27-Aug-13 3:02 
AnswerRe: Serial Port reading char string Pin
OriginalGriff27-Aug-13 3:41
mveOriginalGriff27-Aug-13 3:41 
You serial port is set at 9600 baud - this is not a fast speed, certainly not in modern terms.
9600 baud means 9,600 bits per second, so with 1 start bit, one stop bit, even parity and 7 bits per character that's a maximum data transfer rate of 960 characters per second.

You SerialPort.DataRecieved event does not fire when the final character is received, it fires when the first character is received. And the second, and the third....
So when you read all the data from the serial port buffer, you will get a "random" number of characters, which may - or may not be - the whole message you are looking for.

Instead of your existing code, set up a BackgroundWorker thread which processes input data from the serial port, scans it to find whole messages, and then signals up to the main thread that a whole message is ready. If it gets a "partial message" is stores it, and adds the next data on the end before scanning it again.
This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre.
Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

AnswerRe: Serial Port reading char string Pin
Jason Gleim27-Aug-13 5:24
professionalJason Gleim27-Aug-13 5:24 
QuestionHow to paste outside of my application Pin
Mahmoud EL-Shazly26-Aug-13 13:32
Mahmoud EL-Shazly26-Aug-13 13:32 
AnswerRe: How to paste outside of my application Pin
BillWoodruff26-Aug-13 13:46
professionalBillWoodruff26-Aug-13 13:46 
GeneralRe: How to paste outside of my application Pin
Mahmoud EL-Shazly27-Aug-13 11:51
Mahmoud EL-Shazly27-Aug-13 11:51 
GeneralRe: How to paste outside of my application Pin
Bernhard Hiller27-Aug-13 20:38
Bernhard Hiller27-Aug-13 20:38 
GeneralRe: How to paste outside of my application Pin
Mahmoud EL-Shazly28-Aug-13 0:42
Mahmoud EL-Shazly28-Aug-13 0:42 
GeneralRe: How to paste outside of my application Pin
DaveyM6928-Aug-13 1:35
professionalDaveyM6928-Aug-13 1:35 
GeneralRe: How to paste outside of my application Pin
Mahmoud EL-Shazly1-Oct-13 20:01
Mahmoud EL-Shazly1-Oct-13 20:01 
AnswerRe: How to paste outside of my application Pin
Bernhard Hiller26-Aug-13 20:52
Bernhard Hiller26-Aug-13 20:52 
AnswerRe: How to paste outside of my application Pin
OriginalGriff27-Aug-13 3:42
mveOriginalGriff27-Aug-13 3:42 
GeneralRe: How to paste outside of my application Pin
Mahmoud EL-Shazly27-Aug-13 14:17
Mahmoud EL-Shazly27-Aug-13 14:17 
QuestionStrongname vs Obfuscation - resistant to tampering? Pin
devvvy26-Aug-13 13:01
devvvy26-Aug-13 13:01 
AnswerRe: Strongname vs Obfuscation - resistant to tampering? Pin
Abhinav S26-Aug-13 19:09
Abhinav S26-Aug-13 19:09 
GeneralRe: Strongname vs Obfuscation - resistant to tampering? Pin
devvvy26-Aug-13 20:02
devvvy26-Aug-13 20:02 
GeneralRe: Strongname vs Obfuscation - resistant to tampering? Pin
Eddy Vluggen26-Aug-13 23:15
professionalEddy Vluggen26-Aug-13 23:15 
GeneralRe: Strongname vs Obfuscation - resistant to tampering? Pin
Dave Kreskowiak27-Aug-13 2:12
mveDave Kreskowiak27-Aug-13 2:12 
GeneralRe: Strongname vs Obfuscation - resistant to tampering? Pin
devvvy27-Aug-13 2:19
devvvy27-Aug-13 2:19 

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.