473,768 Members | 8,596 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.outpu t = "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 2600
* "Barry" <an*******@disc ussions.microso ft.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.outpu t = "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
4934
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
3529
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 unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in axinterop.mscommlib.dll
0
2154
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 have rights to use the control. You have to contact the manufacturer of the control--MS may not be the manufacturer, in the original VB 6 docs it told you who to contact. Then you must pay them what they are asking, some are a one time fee and...
4
3454
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 being held by the MSComm is not being released. I am using the SetPortOpen method. Is there any way of releasing this memory explicitly. Regards.
6
6618
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 to access the serial port, I cannot seem to be able to access the mscomm control from within a code module. In VB6 you could use the statement frmMain.Mscomm1.output = "some data string" in the code module but this won't work in VB.NET. Does...
9
9066
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 component mscomm32.ocx (1.1.0) You need to install this component before you upgrade the project. Does anyone know how to install the mscomm component.
6
8222
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 not recognize this statement. Loop Until Len(Buffer) > 0
0
1579
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, n store the data in to one string type variable , msStr but some time it store the Mscomminput, n some times it stores nothing, but in mscomm.input will have a GPS data, why it is So?
0
1705
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 from HRESULT: 0x800A1F52. No one has been able to tell me why this isn't working. I know VB 2003 doesn't have serial control however I need to send this with the mscomm. It will break at the line : comm1.Output = Packet(i)
0
10175
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10017
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9961
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9843
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.