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 .

Hi,

Assign this way :


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

Regards
Veena

thank u Veena,But u did'nt get the Form Query

Hi,

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

REgards
Veena

in which form
Main Or Setting

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.