Click here to Skip to main content
15,884,099 members
Home / Discussions / C#
   

C#

 
AnswerRe: set the parent form size according to child form in mdi form Pin
Matt U.28-Dec-12 4:16
Matt U.28-Dec-12 4:16 
AnswerRe: set the parent form size according to child form in mdi form Pin
Eddy Vluggen28-Dec-12 9:04
professionalEddy Vluggen28-Dec-12 9:04 
QuestionSelected rows in a gridview Pin
rakeshs31227-Dec-12 19:26
rakeshs31227-Dec-12 19:26 
AnswerRe: Selected rows in a gridview Pin
vanikanc28-Dec-12 6:48
vanikanc28-Dec-12 6:48 
GeneralRe: Selected rows in a gridview Pin
rakeshs31228-Dec-12 18:48
rakeshs31228-Dec-12 18:48 
AnswerRe: Selected rows in a gridview Pin
Abhinav S28-Dec-12 23:39
Abhinav S28-Dec-12 23:39 
QuestionSliding an Image on another Image Pin
Shubhanshu Pathak27-Dec-12 18:09
Shubhanshu Pathak27-Dec-12 18:09 
QuestionSerial Port Won't Send While Receiving Pin
C-P-User-327-Dec-12 15:13
C-P-User-327-Dec-12 15:13 
When the receiving side of this serial port is idle, this sending method works just fine...
C#
public static void SendCommandOutTheSerialPort()
     {
         int Length;
         int StartingPosition;
         byte[] TheBytesToSend;

         Length = TheCommandToTheBox.Length;
         StartingPosition = 0;
         TheBytesToSend = TheCommandToTheBox;

         myPortPool.myPort.Write(TheBytesToSend, StartingPosition, Length);

     }


In fact, the Serial port can (and will, and does) send anything just fine.

The moment the external box starts sending us data, this method apparently stops and goes into an eternal loop on the last line.

Stopping the app in debug produces not a yellow arrow on the instruction (i.e., the last one in this method) but a green one instead.

Hovering over that green arrow produces this message..

C#
"This is the next statement to execute when this thread returns from the current function"


I do not understand what thread the debugger has in mind, because I didn't start a thread. The only thing I can think of that even strikes the thought of the word "thread" in my mind is the background event handler that is doing the receive.

Just for good measure, I've set some breakpoints in the event handler that responds to bytes received on that same serial port, and it is properly receiving the bytes from the external box.

In fact, that's how we determined that conflict that was causing this. (We made the external box go silent; never sending any data, so this app can send without any response back.)

If it makes any difference, the send method and the receive method are in different classes.

Thanks for any light on the mystery.
AnswerRe: Serial Port Won't Send While Receiving Pin
Richard MacCutchan27-Dec-12 21:45
mveRichard MacCutchan27-Dec-12 21:45 
GeneralRe: Serial Port Won't Send While Receiving Pin
C-P-User-328-Dec-12 5:21
C-P-User-328-Dec-12 5:21 
GeneralRe: Serial Port Won't Send While Receiving Pin
Richard MacCutchan28-Dec-12 5:45
mveRichard MacCutchan28-Dec-12 5:45 
GeneralRe: Serial Port Won't Send While Receiving Pin
C-P-User-328-Dec-12 5:59
C-P-User-328-Dec-12 5:59 
GeneralRe: Serial Port Won't Send While Receiving Pin
Richard MacCutchan28-Dec-12 6:40
mveRichard MacCutchan28-Dec-12 6:40 
AnswerRe: Serial Port Won't Send While Receiving Pin
GrooverFromHolland28-Dec-12 7:04
GrooverFromHolland28-Dec-12 7:04 
AnswerRe: Serial Port Won't Send While Receiving Pin
jschell28-Dec-12 9:53
jschell28-Dec-12 9:53 
GeneralRe: Serial Port Won't Send While Receiving Pin
C-P-User-331-Dec-12 10:54
C-P-User-331-Dec-12 10:54 
GeneralRe: Serial Port Won't Send While Receiving Pin
C-P-User-31-Jan-13 13:35
C-P-User-31-Jan-13 13:35 
GeneralRe: Serial Port Won't Send While Receiving Pin
C-P-User-31-Jan-13 13:36
C-P-User-31-Jan-13 13:36 
GeneralRe: Serial Port Won't Send While Receiving Pin
GrooverFromHolland1-Jan-13 23:41
GrooverFromHolland1-Jan-13 23:41 
GeneralRe: Serial Port Won't Send While Receiving Pin
C-P-User-32-Jan-13 4:25
C-P-User-32-Jan-13 4:25 
GeneralRe: Serial Port Won't Send While Receiving Pin
C-P-User-37-Jan-13 9:21
C-P-User-37-Jan-13 9:21 
QuestionQuestion about split Pin
S Douglas27-Dec-12 6:32
professionalS Douglas27-Dec-12 6:32 
AnswerRe: Question about split Pin
PIEBALDconsult27-Dec-12 7:20
mvePIEBALDconsult27-Dec-12 7:20 
GeneralRe: Question about split Pin
S Douglas27-Dec-12 8:04
professionalS Douglas27-Dec-12 8:04 
GeneralRe: Question about split Pin
SledgeHammer0127-Dec-12 10:38
SledgeHammer0127-Dec-12 10:38 

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.