Answer the question
In order to leave comments, you need to log in
How to continuously read data on Serial Port?
Are there any experts in Visual studio C++ windows application?
How to organize continuous execution of a function?
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
this->serialPort1->PortName = this->ComboboxComs->Text;
this->serialPort1->BaudRate = 9600;
this->serialPort1->Open();
this->richTextBox1->Text = "Соединение установлено";
this->progressBar1->Value = 100;
this->label2->Text = "Соединен";
this->button1->Enabled = false;
while (this->serialPort1->IsOpen)
{
this->richTextBox1->Text = this->serialPort1->ReadLine();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question