August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxMSComm1.PortOpen = True If Err.Number = 0 Then MsgBox("Open communication!") Else MsgBox("Error opening COM port. Please verify MSR is set to COM Port 3.") End If Exit Sub RegError: MsgBox("Error locating ODBC connection. Please verify ODBC connection has been created.") End End Sub Private Sub AxMSComm1_OnComm(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxMSComm1.OnComm Dim InBuffer As String Select Case AxMSComm1.CommEvent Case MSCommLib.OnCommConstants.comEvReceive InBuffer = CStr(AxMSComm1.Input) Call HandleInput(InBuffer) End Select End Sub Sub HandleInput(ByVal InBuffer As String) ' This is where you will process your input. This ' includes trapping characters, parsing strings, ' separating data fields, etc. For this case, you ' are simply going to display the data in the TextBox. txtOCR.Text = InBuffer MsgBox(InBuffer) End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.