Putting Recieved Data in a Label.Caption with MSCOMM32.OCX 
Author Message
 Putting Recieved Data in a Label.Caption with MSCOMM32.OCX

Yeah,
I need help with using Microsoft Comm Control 5.0
I need to take the Recieved Data from the Dial-Up number
and place it in a Label.Caption




Thu, 09 Aug 2001 03:00:00 GMT  
 Putting Recieved Data in a Label.Caption with MSCOMM32.OCX
Hi,

Well, you probably should not use a Label.  A TextBox is a better idea.  The
VBTerm example that comes with VB shows how to do this, as do a number of
examples in my book (see below for information).  I have several variations
that you might choose from depending on how sophisticated a program you are
writing.

Simplest might be:

MSComm1.RThreshold = 1    'Enable OnComm receive events
MSComm1.PortOpen = True
Private Sub MSComm1_OnComm ()
Dim Buffer As String
    Buffer = MSComm1.Input
    If Len(Text1.Text) > 16000 Then Text1.Text = ""
    Text1.SelText = Buffer
End Sub
--
Richard Grier
Hard & Software
12962 West Louisiana Avenue
Lakewood, CO  80228
303-986-2179 (voice)
303-986-3143 (fax)
Author of Visual Basic Programmer's Guide to Serial Communications, 2nd
Edition (355 pages).
For information look on my homepage at
http://ourworld.compuserve.com/homepages/richard_grier.
Use the Books link to order.  For faster service contact the publisher at
http://www.mabry.com.



Thu, 09 Aug 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. vb4: put tab chr(9) in label.caption or text box.text

2. Putting the Win Username and Company in a label caption

3. MSComm does not recieve data when Hyper Terminal recieves data OK

4. need help making label caption data - aware

5. Help: VB6 Data Report - Assign Run-time Label Caption

6. Help: VB6 Data Report - Assign Run-time Label Caption

7. Changing Label Captions on a Data Report.

8. need help making label caption data - aware

9. Allowing the user to data enter Label control's Caption property

10. Problems with binary data using MsComm32.ocx of VB 5.0

11. Label.Caption too big for Label.Width

12. Errors reading data with MSComm32.ocx

 

 
Powered by phpBB® Forum Software