Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

How Can I Have Two Forms use a Serial Port

$
0
0
I have one form (frmMain) that is successfully transmitting and receiving over a serial comport using MSComm1.

I want to open a new form, get an input from the user and send it out the same comport. I may want to keep this new form open for multiple inputs.

I tried using this code in the new form:
frmMain.MSComm1.Output = Chr(11)
frmMain.MSComm1.Output = Chr(Column2Display)

But nothing goes out the port. If I exit (click "X") on the new form I return to the existing form and the port is working fine.

How can I share the port between two forms?

Thanks In Advance,
Pete

Viewing all articles
Browse latest Browse all 21243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>