By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,206 Members | 1,020 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,206 IT Pros & Developers. It's quick & easy.

Mscomm control in VB.NET

P: n/a
I am using the mscomm activex control in vb.net. I can
add the control to the toolbar which will allow me to
drop it onto a form. As long as I am in the code space
for that form it works fine. When I try to output some
text to the serial port via AxMscomm1.output = "some
text" within a code module, the compiler says that
AxMscomm1 is not defined. Can anyone tell me how I pass a
reference to the mscomm control located on one form from
within a code module. I know I need to pass a reference
to the control but I need to know exactly how that is
accomplished.
Thanks,
Barry

Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
* "Barry" <an*******@discussions.microsoft.com> scripsit:
I am using the mscomm activex control in vb.net. I can
add the control to the toolbar which will allow me to
drop it onto a form. As long as I am in the code space
for that form it works fine. When I try to output some
text to the serial port via AxMscomm1.output = "some
text" within a code module, the compiler says that
AxMscomm1 is not defined. Can anyone tell me how I pass a
reference to the mscomm control located on one form from
within a code module. I know I need to pass a reference
to the control but I need to know exactly how that is


You will have to pass a reference to the control to the module, for
example in a public property in the module which is set to the instance
of the MSComm control before calling the procedure or in a parameter of
the procedure.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.