Marketplace products

MSComm Example

Cost
Free
Version
1

Overview

This example program introduces you to the MS Comm control, and allows you to play around with different commands and settings

Comments

  1. 11 Sep 2006 at 13:16

    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

     

  2. 01 Jan 1999 at 00:00

    This thread is for discussions of MSComm Example.

Leave a comment

Sign in or Join us (it's free).

We'd love to hear what you think! Submit ideas or give us feedback