Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSCOMM/Serial Communications

Status
Not open for further replies.

Leighton21

Technical User
Dec 17, 2001
83
AU
Hi All,

Just a Question?

I have opened a hyperterminal session and then created a vb app with a MSCOMM control.
What I was trying to do was to send data to the hyperterminal session through the VB app.

I have tried the following code (on a button click)

Private Sub Command1_Click()
With MSComm1
If .PortOpen = True Then
'send the data (including a tailing carriage return as often needed)
.Output = "TEST" & vbCr
End With
End Sub

But it says that the port is already open.

Therefore is it possible to have a COM port open with an APP such as hyperterminal and then simulate the transmission of data through a VB app?

Cheers
 

This will not work. You can not have two applications open the same comm port at the same time. I don't know if there is a way to open an instance of hyperterminal from VB, then pass the required strings. Maybe someone can help us there.


HyperEngineer
If it ain't broke, it probably needs improvement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top