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

C#

 
GeneralRe: how to use desktop composition + C# Pin
jojoba201125-Jun-12 4:26
jojoba201125-Jun-12 4:26 
GeneralRe: how to use desktop composition + C# Pin
Richard MacCutchan25-Jun-12 4:48
mveRichard MacCutchan25-Jun-12 4:48 
GeneralRe: how to use desktop composition + C# Pin
BobJanova25-Jun-12 4:52
BobJanova25-Jun-12 4:52 
GeneralRe: how to use desktop composition + C# Pin
jojoba201125-Jun-12 17:51
jojoba201125-Jun-12 17:51 
Questionascii to decimal Pin
Member 916404524-Jun-12 8:29
Member 916404524-Jun-12 8:29 
AnswerRe: ascii to decimal Pin
Luc Pattyn24-Jun-12 8:53
sitebuilderLuc Pattyn24-Jun-12 8:53 
AnswerRe: ascii to decimal Pin
NeonMika24-Jun-12 10:29
NeonMika24-Jun-12 10:29 
GeneralRe: ascii to decimal Pin
Member 916404524-Jun-12 17:08
Member 916404524-Jun-12 17:08 
Sorry for the confusion. My english is not perfect. The hard rate monitor device sends a series of 64 bytes every second ( 1 Hz frequency)each byte has different value from 0 to 255, and i need to work on byte number 12. But unfortunetly I received this series of bytes in ascii (hrArray[] in the following code ). So my question is how to convert what I get ( the ascii) into byte value.

C#
private void serialPort2_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            hrStr = serialPort2.ReadExisting();
            if (hrStr == "") return;
            hrArray[hrIndex]= hrStr;// to store the received strings into a string array
            lblTest3.Text = hrStr;
            sw.WriteLine(hrStr);// used to save the received data into a file
            hrIndex++;
            if (hrIndex == 64)
            {
                hrSum += Convert.ToInt32(hrArray[12]);
                lblTest.Text = hrArray[12];
                hrCounter++;
                hrIndex = 0;
            }
        }

AnswerRe: ascii to decimal Pin
Luc Pattyn24-Jun-12 17:50
sitebuilderLuc Pattyn24-Jun-12 17:50 
GeneralRe: ascii to decimal Pin
Basim 227-Jun-12 10:21
Basim 227-Jun-12 10:21 
AnswerRe: ascii to decimal Pin
Luc Pattyn27-Jun-12 11:17
sitebuilderLuc Pattyn27-Jun-12 11:17 
GeneralRe: ascii to decimal Pin
Richard MacCutchan24-Jun-12 22:35
mveRichard MacCutchan24-Jun-12 22:35 
GeneralRe: ascii to decimal Pin
Basim 225-Jun-12 4:41
Basim 225-Jun-12 4:41 
QuestionUnhanded Exception Error Pin
Saidrex23-Jun-12 22:42
Saidrex23-Jun-12 22:42 
AnswerRe: Unhanded Exception Error Pin
Sandeep Mewara23-Jun-12 22:57
mveSandeep Mewara23-Jun-12 22:57 
GeneralRe: Unhanded Exception Error Pin
Saidrex23-Jun-12 23:36
Saidrex23-Jun-12 23:36 
GeneralRe: Unhanded Exception Error Pin
Sandeep Mewara24-Jun-12 2:28
mveSandeep Mewara24-Jun-12 2:28 
GeneralRe: Unhanded Exception Error Pin
Saidrex24-Jun-12 2:32
Saidrex24-Jun-12 2:32 
AnswerRe: Unhanded Exception Error Pin
Eddy Vluggen23-Jun-12 23:40
professionalEddy Vluggen23-Jun-12 23:40 
GeneralRe: Unhanded Exception Error Pin
Saidrex24-Jun-12 0:09
Saidrex24-Jun-12 0:09 
GeneralRe: Unhanded Exception Error Pin
Eddy Vluggen24-Jun-12 0:14
professionalEddy Vluggen24-Jun-12 0:14 
GeneralRe: Unhanded Exception Error Pin
Saidrex24-Jun-12 0:17
Saidrex24-Jun-12 0:17 
GeneralRe: Unhanded Exception Error Pin
Eddy Vluggen24-Jun-12 0:25
professionalEddy Vluggen24-Jun-12 0:25 
GeneralRe: Unhanded Exception Error Pin
Saidrex24-Jun-12 0:32
Saidrex24-Jun-12 0:32 
GeneralRe: Unhanded Exception Error Pin
jschell24-Jun-12 12:27
jschell24-Jun-12 12: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.