0

Hello , iwant to make a frmSetting Form for mscomm control and in the Form i have kept TextBox to send data to port .And i also have the main Form on which is the main Form of the project . when i opening the port, in the Setting form it allow me to send data to port but when i am using the main Form to send data to the port it give's the error that the port is already open.So it does'nt allow me to send data from MainForm.
And in my frmsetting Form i have kept the 4 combo box to get the Baud Rate,Parity,Data bit,Stopbit,
But when i assigning this value to Setting Property of the mscomm control in this manner it doesnot allow to assign
Mscomm1.Settings="Combo1.Text,Combo2.Text,Combo3.Text,.." . It assigning in this manner "9600,N,8,1" to it settings.
Main Question How to Keep the Port open Common to Both the Form's on the startup of the any Form And How to set it Settiings value's.If any doubt in the Q's then pls ask Thank u .

2
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by jatinder_44
0

Hi,

Assign this way :


Mscomm1.Settings=Combo1.Text & "," & Combo2.Text _
& "," & Combo3.Text & "," & Combo4.Text

Regards
Veena

0

Hi,

Before Opening again the MSCommControl, Close It and Check the Status..
MSComm1.PortOpen = False
It should work fine..

REgards
Veena

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.