Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where can I find an active x controller to access serial port ?

Status
Not open for further replies.

netwalker1

Programmer
Feb 5, 2000
1,241
0
0
EG
I can't access the serial port from the Visual Basic..<br>
how can I ??<br>

 
MSComm comes with VB<br>
Click &quot;Project&quot; menu &quot;Components&quot;<br>
look for Microsft Comm Control<br>
<br>
Here is some code for it<br>
<br>
Private Sub MSComm1_OnComm()<br>
'put this in the sub above<br>
Static Buffer As String<br>
If MSComm1.CommEvent = 2 Then<br>
Buffer = Buffer & MSComm1.Input<br>
If InStr(Buffer, Chr$(13)) Then<br>
Text1 = Left$(Buffer, Len(Buffer) - 1) ' strip off chr$(13) cariage return<br>
<br>
Buffer = &quot;&quot;<br>
End If<br>
End If<br>
End Sub<br>

 
Saxcomm makes a good 3rd party control that can be plugged in with little trouble. It has many more features than MSComm including built in protocols like Xmodem and Ymodem. Although fairly expensive I have used it and there is a 30 day trial.
 
Thanx positran <br>
But I can't use the trial version in my work,<br>
beside that the Mscomm works so good Till Now :)))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top