Click here to Skip to main content
16,012,468 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to create a style for a combobox in c# Pin
V.4-Nov-11 3:07
professionalV.4-Nov-11 3:07 
GeneralRe: How to create a style for a combobox in c# Pin
Arunkumar.Koloth4-Nov-11 5:06
Arunkumar.Koloth4-Nov-11 5:06 
GeneralRe: How to create a style for a combobox in c# Pin
Richard MacCutchan4-Nov-11 0:33
mveRichard MacCutchan4-Nov-11 0:33 
AnswerRe: How to create a style for a combobox in c# Pin
Abhinav S4-Nov-11 1:11
Abhinav S4-Nov-11 1:11 
AnswerRe: How to create a style for a combobox in c# Pin
BillWoodruff4-Nov-11 1:22
professionalBillWoodruff4-Nov-11 1:22 
QuestionCustom Tab Control - Painting Tabs When Scrolling Pin
Matt U.3-Nov-11 6:54
Matt U.3-Nov-11 6:54 
AnswerRe: Custom Tab Control - Painting Tabs When Scrolling Pin
BobJanova4-Nov-11 6:06
BobJanova4-Nov-11 6:06 
QuestionSerial Port Class bug??? Pin
glennPattonWork33-Nov-11 5:47
professionalglennPattonWork33-Nov-11 5:47 
Hi,

Umm I have used the Serial Port class quite a bit never had any problems with it, but I have had some problems with the later boards we have produced and found I have to use a cludgy method shown below:
C#
int i, j;

   byte[] bytes = System.Text.Encoding.ASCII.GetBytes(rtbOutgoing.Text);

   j = rtbOutgoing.Text.Length;
   for (i = 0; i < j; i++)
   {
       binaryWriter1.Write(bytes[i]);

   }
   rtbOutgoing.Text = "";

I have used it with no problems but a colleague got some of source hacked it around and said "Your code doesn't work!" in looking at he was doing ComPort.Write("saasa");
where as I do:
C#
for (int i = 0; i < Length; i++)
            {
                CommandSent = Command1.Substring(j, 1);
                myComPort.Write(CommandSent);
                //MessageBox.Show(CommandSent);
                richTextBox1.Text += CommandSent;
                j++;
            }
            myComPort.Write("\r\n");

He now blames his code not working and mine working on Windows or a bug in the Serial Port Write Method. My thinking was ComPort.Write("sasa") sends the string as a whole where my method splits up the string to individual characters. So is it Windows and the Serial Port Class at fault or the boards serial reading function. Interested in any similar experience any one has had.

Glenn
AnswerRe: Serial Port Class bug??? Pin
BobJanova3-Nov-11 6:02
BobJanova3-Nov-11 6:02 
GeneralRe: Serial Port Class bug??? Pin
glennPattonWork33-Nov-11 6:15
professionalglennPattonWork33-Nov-11 6:15 
AnswerRe: Serial Port Class bug??? Pin
Roger Wright3-Nov-11 7:01
professionalRoger Wright3-Nov-11 7:01 
GeneralRe: Serial Port Class bug??? Pin
glennPattonWork33-Nov-11 7:16
professionalglennPattonWork33-Nov-11 7:16 
AnswerRe: Serial Port Class bug??? Pin
Richard MacCutchan3-Nov-11 7:20
mveRichard MacCutchan3-Nov-11 7:20 
GeneralRe: Serial Port Class bug??? Pin
Luc Pattyn3-Nov-11 7:34
sitebuilderLuc Pattyn3-Nov-11 7:34 
GeneralRe: Serial Port Class bug??? Pin
Richard MacCutchan3-Nov-11 23:20
mveRichard MacCutchan3-Nov-11 23:20 
AnswerRe: Serial Port Class bug??? Pin
Luc Pattyn3-Nov-11 7:30
sitebuilderLuc Pattyn3-Nov-11 7:30 
GeneralRe: Serial Port Class bug??? Pin
Roger Wright3-Nov-11 8:43
professionalRoger Wright3-Nov-11 8:43 
AnswerRe: Serial Port Class bug??? Pin
Luc Pattyn3-Nov-11 9:23
sitebuilderLuc Pattyn3-Nov-11 9:23 
GeneralRe: Serial Port Class bug??? Pin
Roger Wright3-Nov-11 10:48
professionalRoger Wright3-Nov-11 10:48 
GeneralRe: Serial Port Class bug??? Pin
Luc Pattyn3-Nov-11 11:03
sitebuilderLuc Pattyn3-Nov-11 11:03 
GeneralRe: Serial Port Class bug??? Pin
glennPattonWork33-Nov-11 23:02
professionalglennPattonWork33-Nov-11 23:02 
GeneralRe: Serial Port Class bug??? Pin
glennPattonWork33-Nov-11 23:22
professionalglennPattonWork33-Nov-11 23:22 
QuestionPassing array by reference from C# to c++/cli Pin
eyalbi0073-Nov-11 4:40
eyalbi0073-Nov-11 4:40 
AnswerRe: Passing array by reference from C# to c++/cli Pin
Mark Salsbery3-Nov-11 5:25
Mark Salsbery3-Nov-11 5:25 
GeneralRe: Passing array by reference from C# to c++/cli Pin
eyalbi0073-Nov-11 22:23
eyalbi0073-Nov-11 22:23 

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.