| View previous topic :: View next topic |
| Author |
Message |
Adam Guest
|
Posted: Mon Mar 27, 2006 11:03 am Post subject: spcomm errors |
|
|
could you check what's wrong with the codes below? Thank you very much.
//----initializtion serial port & open
it -----------------------------------------------------------------------
void __fastcall TForm3::BitBtn1Click(TObject *Sender)
{
this->Comm1->CommName=this->ComboBox1->Text; //number serial port
this->Comm1->BaudRate=StrToInt(this->ComboBox2->Text); //baud rate
this->Comm1->ByteSize=StrToInt(this->ComboBox3->Text); // data bits
this->Comm1->StopBits=StrToInt(this->ComboBox4->Text); // data stop bits
this->Comm1->Parity=this->ComboBox5->Text; // parity check
this->Comm1->XoffLimit=500; //send buffer capascity
this->Comm1->XonLimit=500; // Receive Buffer capacity
this->Comm1->StartComm();
} |
|
| Back to top |
|
 |
Andrue Cope [TeamB] Guest
|
Posted: Mon Mar 27, 2006 11:03 am Post subject: Re: spcomm errors |
|
|
Adam wrote:
| Quote: | could you check what's wrong with the codes below? Thank you very
much.
|
That's an open ended question. If you want help from people you need to
give as much information as possible. What kind of error are you
seeing? Runtime? Compile time?
From a cursor inspection I'd say that the code looks like it ought to
compile but beyond that I don't know.
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html |
|
| Back to top |
|
 |
Adam Guest
|
Posted: Tue Mar 28, 2006 3:03 am Post subject: Re: spcomm errors |
|
|
1,error line:this->Comm1->Parity=this->ComboBox5->Text;
error information:[C++ Error] Unit3.cpp(44): E2034 Cannot convert
'AnsiString' to 'TParity'
2,error line: this->Comm1->ByteSize=StrToInt(this->ComboBox3->Text);
error information:[C++ Warning] Unit3.cpp(42): W8018 Assigning int to
TByteSize
3,error line:this->Comm1->StopBits=StrToInt(this->ComboBox4->Text);
error information:[C++ Warning] Unit3.cpp(43): W8018 Assigning int to
TStopBits
Thank you in advance.
"Andrue Cope [TeamB]" <no.spam (AT) not (DOT) a.valid.address> wrote in message
news:4427bd1b (AT) newsgroups (DOT) borland.com...
| Quote: | Adam wrote:
could you check what's wrong with the codes below? Thank you very
much.
That's an open ended question. If you want help from people you need to
give as much information as possible. What kind of error are you
seeing? Runtime? Compile time?
From a cursor inspection I'd say that the code looks like it ought to
compile but beyond that I don't know.
--
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html |
|
|
| Back to top |
|
 |
|