473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Mscomm control in VB.NET

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
1 2556
* "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jinoy | last post by:
how can i detect an incoming caller's telephone keystroke using modem, using mscomm or other? how can i detect an outgoing call using mscomm? how can i get a caller id using mscomm?
1
by: Peter Krikelis | last post by:
Hi, I am trying to develope a User Control Library that features MScomm control. I test my user control in a test application. When I run the application I receive the following: An...
0
by: morgal | last post by:
That is one reason I quit using MS custom controls, you have to buy the license. In VB 6 they give you a try it license and then you develop a huge application or small one and find out you don't...
4
by: AA | last post by:
Hi I am developing an app in which I have used a MSComm object. I have opened the port, performed the transactions, and then closed the port. But when I check in the task mamager, the memory...
6
by: Barry Martin | last post by:
I am using an activex control mscomm to control a serial port in VB.NET. I place the control on the main form and set its port, baud rate, etc. properties. After creating a code module that needs...
9
by: Carl Gilbert | last post by:
Hi I'm trying to open a vb6 project in vb.net which uses the mscomm component. When running the vb upgrade wizard in vb.net, an error is raised: Upgrade failed, unable to load reerenced...
6
by: Tico Tech | last post by:
Hi: I have a question about the Microsoft Communications Control Version 6.0 from visual studio .net. I have this code: Dim Buffer As String Do Buffer = AxMSComm1.Input() //Error, it does...
0
by: swati2106 | last post by:
HI, I have develop a apllication , To store the GPS data in database, for that , to read GPS data I have used the Mscomm port, In which I create the object of class RS232 n open that port,...
0
by: cmdolcet69 | last post by:
I get the following error message when I output to the mscomm: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in COM.exe Additional information: Exception...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.