Marketplace products
MSComm Example
- Cost
- Free
- Version
- 1
Page 1 of 2
- Overview
- Screen Shots
Overview
This example program introduces you to the MS Comm control, and allows you to play around with different commands and settings
Here is an expamle try it:
//first call InitComPort() in NewBase()
Private Sub InitComPort()
com.CommPort = 1
If com.PortOpen Then
com.PortOpen = False
End If
com.RThreshold = 1
com.Settings = "9600,n,8,1"
com.DTREnable = True
com.Handshaking = MSCommLib.HandshakeConstants.comNone
com.InputMode = MSCommLib.InputModeConstants.comInputModeText
com.InputLen = 0
com.NullDiscard = False
AddHandler com.OnComm, AddressOf Me.OnComm
com.PortOpen = True
End Sub
Private Sub OnComm(ByVal sender As Object, ByVal e As EventArgs)
If com.InBufferCount > 0 Then
ProcessComData(CType(com.Input, String))
End If
End Sub
Private Sub ProcessComData(ByVal input As String)
rtfTerminal.AppendText(input + "" & Microsoft.VisualBasic.Chr(10) & "")
End Sub
This thread is for discussions of MSComm Example.