BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

spcomm errors

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
Adam
Guest





PostPosted: Mon Mar 27, 2006 11:03 am    Post subject: spcomm errors Reply with quote



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





PostPosted: Mon Mar 27, 2006 11:03 am    Post subject: Re: spcomm errors Reply with quote



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





PostPosted: Tue Mar 28, 2006 3:03 am    Post subject: Re: spcomm errors Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.