![]() ![]() |
This topic was raised by a recent post http://www.control.com/1026175175/index_html. The following code found at http://support.microsoft.com/default.aspx?scid=kb;en-us;194922 was given as a solution.
My project involves wireless transmission using UHF Data Tranceiver modules. I have only started using Visual Basic. Would this code be suitable for transmitting data between the two modules connected to the serial ports? Would it be more suitable to use Java?
Any help would be greatly appreciated.....
My project involves wireless transmission using UHF Data Tranceiver modules. I have only started using Visual Basic. Would this code be suitable for transmitting data between the two modules connected to the serial ports? Would it be more suitable to use Java?
Any help would be greatly appreciated.....
![]() ![]() |
You can very well use the MS Comm Control OCX. Use the following steps.
Include the control in the project.
Drag it to a VB form.
double click it and set its parameters like Baud Rate, Stop Hits, Number of bits, Etc.
Drag a command button in your form.
Type the following script in the form open event:
Me.Mscomm1.PortOpen = True
Type the following script into the click event of your command button:
Me.Mscomm1.Output = "the Data to be sent "
// you can read the data comming to your comm port through the mscomm event. the Property will be "input"
use the following script in the mscomm event to read the data
Dim ReadData as String
ReadData = Me.MsComm1.input
Include the control in the project.
Drag it to a VB form.
double click it and set its parameters like Baud Rate, Stop Hits, Number of bits, Etc.
Drag a command button in your form.
Type the following script in the form open event:
Me.Mscomm1.PortOpen = True
Type the following script into the click event of your command button:
Me.Mscomm1.Output = "the Data to be sent "
// you can read the data comming to your comm port through the mscomm event. the Property will be "input"
use the following script in the mscomm event to read the data
Dim ReadData as String
ReadData = Me.MsComm1.input
![]() ![]() |
I don't understand quite how you drag the MSComm control into the VB form. In The control menu MSComm command is check marked but I can't bring it into a form, could someone further explain this, I'm new to VB.
![]() ![]() |
If you've got a tick next to the MS Comm control under Project - Components, you should have an icon in the toolbox which looks like a telephone. Just click it once, then move the mouse over the form. Now hold down the left mouse button and drag a small distance (doesn't really matter how far), then let go of the mouse button. You should now have the control on your form.
![]() ![]() |
Push Ctrl+T then Add MsComm from the list by check this, then "Apply", "OK".
From the toolbox, make Double click from MsComm, or drag this to Form.
From the toolbox, make Double click from MsComm, or drag this to Form.
![]() ![]() |
![]() ![]() |
That solution should work, as the radios should be transparent. I recommend taking a look at http://www.planetsourcecode.com.. You'll find plenty of examples and source code to get you a starting point.
- CH
- CH
Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2013 Nerds in Control, LLC. All rights reserved.
Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.
Fortune
It has been said that man is a rational animal. All my life I have
been searching for evidence which could support this.
-- Bertrand Russell








