Click here to Skip to main content
15,924,402 members
Home / Discussions / C#
   

C#

 
GeneralRe: disable datagrid column width adjustment at runtime Pin
salon6-Mar-07 22:02
salon6-Mar-07 22:02 
QuestionTabbed Notepad Pin
64-bit6-Mar-07 16:20
64-bit6-Mar-07 16:20 
QuestionDataBindings Save Pin
smarttom996-Mar-07 15:38
smarttom996-Mar-07 15:38 
AnswerRe: DataBindings Save Pin
sam#6-Mar-07 20:01
sam#6-Mar-07 20:01 
GeneralRe: DataBindings Save Pin
smarttom997-Mar-07 5:13
smarttom997-Mar-07 5:13 
GeneralRe: DataBindings Save Pin
smarttom997-Mar-07 5:13
smarttom997-Mar-07 5:13 
QuestionProblems with Reading Data from Serial Port (from .NET 2.0 framework) Pin
kmkimlo6-Mar-07 15:34
kmkimlo6-Mar-07 15:34 
AnswerRe: Problems with Reading Data from Serial Port (from .NET 2.0 framework) Pin
PS@Codeproj6-Mar-07 19:33
PS@Codeproj6-Mar-07 19:33 
.... U have created the instance of the serial port as "objR232Driver" and set all the necessary parameters.But you were trying to use some other object named "rs232SerialPort". Where you created the obj for the later serial port?

You can make use of the below lines of code:
System.IO.Ports.SerialPort rs232SerialPort = new System.IO.Ports.SerialPort("COM" + CStr(intPort),9600,ioParity.None,DataBits.8);

and Set the read time out to either 2 or 3 secs.
The code is:
rs232SerialPort.ReadTimeOut = 2000; (For 2 secs)

Then use ur read port function:
intToRead = rs232SerialPort.BytesToRead();
rs232SerialPort.Read(bData, 0, intToRead);

Instead of Read function you can also make use of readbyte function that shall be used later for finding out any Start_Communication_Byte or like that...

The snippet ll be:

System.IO.Ports.SerialPort rs232SerialPort = new System.IO.Ports.SerialPort("COM" + CStr(intPort),9600,ioParity.None,DataBits.8);
rs232SerialPort.ReadTimeOut = 2000; (For 2 secs)
intToRead = rs232SerialPort.BytesToRead();
byte[]bData= new byte[intToRead ];
for (int nIndex = 0; nIndex < intToRead ; nIndex ++)
{
bData[nIndex ] = (byte)(rs232SerialPort.ReadByte());
}

The above ll surely help you to get the data in the Serial port buffer.

Thanks & Rgds,
Sri..

AnswerRe: Problems with Reading Data from Serial Port (from .NET 2.0 framework) Pin
pbraun7-Mar-07 3:12
pbraun7-Mar-07 3:12 
Questionhaving user thread update listViewItem.BackColor Pin
yccheok6-Mar-07 13:46
yccheok6-Mar-07 13:46 
Questionhow to increase the height of the Row in ListView? Pin
Khoramdin6-Mar-07 13:04
Khoramdin6-Mar-07 13:04 
AnswerRe: how to increase the height of the Row in ListView? Pin
Ravi Bhavnani6-Mar-07 17:11
professionalRavi Bhavnani6-Mar-07 17:11 
Questionaccessing a file on Local network Pin
wildpankaj6-Mar-07 12:37
wildpankaj6-Mar-07 12:37 
AnswerRe: accessing a file on Local network Pin
Ravi Bhavnani6-Mar-07 17:17
professionalRavi Bhavnani6-Mar-07 17:17 
AnswerRe: accessing a file on Local network Pin
Keshav V. Kamat6-Mar-07 17:25
Keshav V. Kamat6-Mar-07 17:25 
AnswerRe: accessing a file on Local network Pin
Keshav V. Kamat6-Mar-07 17:32
Keshav V. Kamat6-Mar-07 17:32 
Questionsystem.diagnostics.process help Pin
JMichael24686-Mar-07 11:57
JMichael24686-Mar-07 11:57 
AnswerRe: system.diagnostics.process help Pin
Dave Kreskowiak6-Mar-07 17:18
mveDave Kreskowiak6-Mar-07 17:18 
GeneralRe: system.diagnostics.process help Pin
JMichael24687-Mar-07 2:55
JMichael24687-Mar-07 2:55 
GeneralRe: system.diagnostics.process help Pin
Dave Kreskowiak7-Mar-07 12:44
mveDave Kreskowiak7-Mar-07 12:44 
GeneralRe: system.diagnostics.process help Pin
JMichael24688-Mar-07 3:48
JMichael24688-Mar-07 3:48 
AnswerRe: system.diagnostics.process help Pin
Ravi Bhavnani6-Mar-07 17:20
professionalRavi Bhavnani6-Mar-07 17:20 
GeneralRe: system.diagnostics.process help Pin
JMichael24687-Mar-07 4:10
JMichael24687-Mar-07 4:10 
QuestionImage in DataGridView Pin
Nooie6-Mar-07 11:21
Nooie6-Mar-07 11:21 
QuestionRetrieving Pin
hadad6-Mar-07 11:20
hadad6-Mar-07 11:20 

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.