Professional Documents
Culture Documents
Home
Products
Downloads
Purchase
Support
About ActiveXperts
ActiveComport
Product Overview
How to use
Online Samples
Manual (.htm)
Release Notes
Download (.exe)
Case Studies:
[ select a case ]
Purchase
Licensing
Pricing
Order now
ActiveComport is a software development kit (SDK) that enables the user to communicate to a device over a serial interface.
Such a device can be: a weight indicator, a modem, a scanner, or any other device that is equiped with a serial port. It can
even be another PC, connected via a NULL modem cable.
ActiveComport features the following:
Direct COM port support (like 'COM1'), TAPI (Windows Telephony Device) support (like 'Standard 56000 bps Modem'), support
for RS-232/RS422/RS485, up to 256 simultaneous ports, support for all types of Hayes compatible modems, support for serial
cable, USB cable or Bluetooth connections, support for GSM/GPRS modems, support for Virtual COM ports (i.e. COM ports
redirected through the network), hardware flow control (RTS/CTS, DTR/DSR), software flowcontrol (XON/XOFF), configurable
baudrate/parity/stopbits, full buffered data transfer, text/binary data transfer.
ActiveComport can be well integrated into Visual Basic environments.
This document describes how the ActiveComport Toolkit can be integrated into Visual Basic 5.x/6.x projects.
Support
FAQ/KBase
Contact Support
Launch 'Microsoft Visual Basic' from the Start menu, and choose 'New' from the 'File Menu'. The 'New Project' dialog appears.
Select 'Standard Exe' and click 'OK':
Related documents
Case study: Using
ActiveComport to send
SMS's (by Sorceress
Entertainment)
AT commands
Serial Communication
Tutorials
"COM1"
"COM2"
"COM3"
"COM4"
"COM5"
"COM6"
"COM7"
"COM8"
comboDevice.ListIndex = 0
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
"Default"
"110"
"300"
"600"
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
comboSpeed.AddItem
"1200"
"2400"
"4800"
"9600"
"14400"
"19200"
"38400"
"57600"
"64000"
"115200"
"128000"
"256000"
comboSpeed.ListIndex = 0
comboHWFlowControl.AddItem "Default"
comboHWFlowControl.AddItem "Disable"
comboHWFlowControl.AddItem "Enable"
comboHWFlowControl.ListIndex = 0
comboSWFlowControl.AddItem "Default"
comboSWFlowControl.AddItem "Disable"
comboSWFlowControl.AddItem "Enable"
comboSWFlowControl.ListIndex = 0
comboDataFormat.AddItem "Default"
comboDataFormat.AddItem "8,n,1"
comboDataFormat.AddItem "7,e,1"
comboDataFormat.ListIndex = 0
textReceived = ""
EnableControls
End Sub
Private Sub buttonOPEN_Click()
objComport.Device = comboDevice.List(comboDevice.ListIndex)
If (comboSpeed.Text = "Default") Then
objComport.BaudRate = 0
Else
objComport.BaudRate = comboSpeed.Text
End If
objComport.LogFile = textLogfile.Text
http://www.activexperts.com/activcomport/howto/vb/ (5 of 8) [03/05/2007 10:06:31 p.m.]
objComport.HardwareFlowControl = comboHWFlowControl.ListIndex
objComport.SoftwareFlowControl = comboSWFlowControl.ListIndex
If (comboDataFormat.ListIndex = 0) Then
objComport.DataBits = objComport.asDATABITS_DEFAULT
objComport.StopBits = objComport.asSTOPBITS_DEFAULT
objComport.Parity = objComport.asPARITY_DEFAULT
End If
If (comboDataFormat.ListIndex = 1) Then
objComport.DataBits = objComport.asDATABITS_8
objComport.StopBits = objComport.asSTOPBITS_1
objComport.Parity = objComport.asPARITY_NONE
End If
If (comboDataFormat.ListIndex = 2) Then
objComport.DataBits = objComport.asDATABITS_7
objComport.StopBits = objComport.asSTOPBITS_1
objComport.Parity = objComport.asPARITY_EVEN
End If
objComport.Open
GetResult
EnableControls
End Sub
Private Sub buttonClose_Click()
objComport.Close
GetResult
EnableControls
End Sub
CheckDTR.Enabled = bOpened
CheckRTS.Enabled = bOpened
checkCTS.Enabled = bOpened
checkDCD.Enabled = bOpened
checkRI.Enabled = bOpened
checkDSR.Enabled = bOpened
buttonOpen.Enabled = bOpened + 1
buttonClose.Enabled = bOpened
buttonSubmit.Enabled = bOpened
Timer1.Enabled = bOpened
End Sub
Private Sub linkErrorCodes_Click()
Shell "Explorer http://www.activexperts.com/support/errorcodes/Index.asp"
End Sub
Private Sub linkWebsite_Click()
Shell "Explorer http://www.activexperts.com"
End Sub
Private Sub Timer1_Timer()
Dim strString
strString = objComport.ReadString
If (strString <> "") Then
textReceived = textReceived & strString & vbCrLf
End If
checkDCD.Value = Abs(objComport.QueryDCD)
checkCTS.Value = Abs(objComport.QueryCTS)
checkDSR.Value = Abs(objComport.QueryDSR)
checkRI.Value = Abs(objComport.QueryRI)
End Sub
Private Sub GetResult()
If objComport.LastError = 0 Then
textResult.Caption = "SUCCESS"
Else
textResult.Caption = "ERROR " & objComport.LastError & " ( " & objComport.GetErrorDescription
(objComport.LastError) & " )"
End If
End Sub
There are many working samples included with the product. You can also find them on the ActiveXperts FTP site: ftp.
activexperts-labs.com/samples/acomport.
http://www.activexperts.com/activcomport/howto/vb/ (7 of 8) [03/05/2007 10:06:31 p.m.]
The ActiveComport tool is COM port development component (SDK). This control can be used by any Windows development
platform, including Visual Basic .NET, Visual CSharp .NET, ASP .NET (VB,CS), ASP, Visual Basic, Visual Studio/Visual C++,
Borland Delphi and C++ Builder, PHP, VBA (Visual Basic for Applications), ColdFusion, HTML, VBScript and any other ActiveX/
COM compliant platform. The ActiveComport Toolkit is an ActiveXperts Software B.V. Product.
Copyright 1999-2007 ActiveXperts Software. All rights reserved.