🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15640

TportControl von Vladimir Afanasyev

#15640
From: Tilo Samulewitz
Date: Thu, 19 Jun 2003 12:56
31 lines
1930 bytes
I'm using the TPortControl it's really nice, but I have one Problem. I want
to change the speed during the program is running.

with this code

void __fastcall TForm1::OldNoseClick(TObject *Sender)
{
  old = true;
  PortControl1->BaudRate = S009600;  // How can I use this?
  PortControl1->OpenPort();
  PortControl1->StartSession(true);
  if(PortControl1->WriteData("!V\r\n",5,&wrNum)<0)ShowMessage("Error");
}
//--------------------------------------------------------------------------
-

void __fastcall TForm1::NewNoseClick(TObject *Sender)
{
  old = false;
  PortControl1->BaudRate = S056000; // How can I use this?
  PortControl1->OpenPort();
  PortControl1->StartSession(true);
}
//--------------------------------------------------------------------------
-

but it doesn't work.
If use one of these BaudRates, e.g. 56000 in the "Objektinspektor", then
NewNoseClick works.

How can I change the BaudRate during the Program works?
Technical Details
Message-ID: <3ef1b3c8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e05aa521e7670a58,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-19 06:03:57 PST
Reply-To: "Tilo Samulewitz" <tilo@netsketch.de>
From: "Tilo Samulewitz" <tilo@netsketch.de>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: TportControl von Vladimir Afanasyev
Date: Thu, 19 Jun 2003 14:56:49 +0200
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 217.85.77.70
Message-ID: <3ef1b3c8@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1056027592 217.85.77.70 (19 Jun 2003 05:59:52 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail