Click here to Skip to main content
15,906,947 members
Home / Discussions / C#
   

C#

 
GeneralRe: GDI+ & Calculation Problems. Pin
Gavin Roberts30-Aug-06 6:37
Gavin Roberts30-Aug-06 6:37 
GeneralRe: GDI+ & Calculation Problems. [modified] Pin
mikone30-Aug-06 7:41
mikone30-Aug-06 7:41 
QuestionAdd buttons to ControlBox? Pin
Vodstok30-Aug-06 5:05
Vodstok30-Aug-06 5:05 
AnswerRe: Add buttons to ControlBox? Pin
mikone30-Aug-06 5:44
mikone30-Aug-06 5:44 
QuestionMemory allocation Pin
pawelpustelnik30-Aug-06 4:56
pawelpustelnik30-Aug-06 4:56 
AnswerRe: Memory allocation Pin
mikone30-Aug-06 5:05
mikone30-Aug-06 5:05 
GeneralRe: Memory allocation Pin
leppie30-Aug-06 11:17
leppie30-Aug-06 11:17 
GeneralRe: Memory allocation Pin
mikone30-Aug-06 11:33
mikone30-Aug-06 11:33 
GeneralRe: Memory allocation Pin
pawelpus30-Aug-06 11:59
pawelpus30-Aug-06 11:59 
GeneralRe: Memory allocation Pin
mikone30-Aug-06 12:28
mikone30-Aug-06 12:28 
GeneralRe: Memory allocation Pin
pawelpus30-Aug-06 22:15
pawelpus30-Aug-06 22:15 
GeneralRe: Memory allocation Pin
mikone31-Aug-06 7:25
mikone31-Aug-06 7:25 
AnswerRe: Memory allocation Pin
Robert Rohde30-Aug-06 5:45
Robert Rohde30-Aug-06 5:45 
GeneralRe: Memory allocation Pin
pawelpus30-Aug-06 12:01
pawelpus30-Aug-06 12:01 
AnswerRe: Memory allocation Pin
Colin Angus Mackay30-Aug-06 9:56
Colin Angus Mackay30-Aug-06 9:56 
GeneralRe: Memory allocation Pin
pawelpus30-Aug-06 11:58
pawelpus30-Aug-06 11:58 
QuestionCreating dependent programs Pin
ToBrax30-Aug-06 4:53
ToBrax30-Aug-06 4:53 
AnswerRe: Creating dependent programs Pin
albCode30-Aug-06 4:56
albCode30-Aug-06 4:56 
AnswerRe: Creating dependent programs Pin
mikone30-Aug-06 4:59
mikone30-Aug-06 4:59 
QuestionCompare 2 DataTables Pin
Omkar Ghaisas30-Aug-06 4:44
Omkar Ghaisas30-Aug-06 4:44 
AnswerDon't crosspost Pin
leckey30-Aug-06 7:42
leckey30-Aug-06 7:42 
QuestionPorts.SerialPort freezes Pin
sjembek30-Aug-06 4:44
sjembek30-Aug-06 4:44 
Hi I'm using the SerialPort class (.net 2.0) for rs232 communications. Unfortunately, an it freezes up my program when I try to set a parameter for it after it's been opened.

First I initialize the port:
SerialPort port = new SerialPort(comname, 19200);
port.Open();
port.ReceivedBytesThreshold = 63;
port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);


Then I do some communications stuff. So far so good. The freeze occurs when I try to use the port for some other process.

if (port.IsOpen) 
   {
   port.DiscardInBuffer(); // will freeze here
   port.DiscardOutBuffer(); // here
   port.Close();            // here
   }

port.ReceivedBytesThreshold = 1; // or here
port.Open();


Any of the commented line freeze up my program as if in a blocking state, and the code doesn't throw an exception of any kind, it just freezes each and any thread currently running. Does anyone have any clues what's happening here?
AnswerRe: Ports.SerialPort freezes Pin
sjembek30-Aug-06 5:20
sjembek30-Aug-06 5:20 
GeneralRe: Ports.SerialPort freezes Pin
Dave Kreskowiak30-Aug-06 5:51
mveDave Kreskowiak30-Aug-06 5:51 
QuestionSearch Pattern Pin
Sabry190530-Aug-06 4:38
Sabry190530-Aug-06 4: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.