|
-
Sep 2nd, 2011, 10:38 AM
#1
Thread Starter
New Member
Missing leading zeros when reading RS232
Hello,
I'm stucked at the problem with reading rs232 and showing it in Textbox.
If I send from one computer using Docklight: "000 220 111 000",
I receive in texbox of my Visual Basic program: "02201110.
Where are missing zeros? I need them.
This is the part of code where I read RS232 and send it to Textbox:
Private Sub MSComm1_OnComm()
Dim strInput As String
With MSComm1
'test for incoming event
Select Case .CommEvent
Case comEvReceive
'display incoming event data to displaying textbox
strInput = .Input
Text1.SelText = Asc(strInput)
End Select
End With 'MSComm1
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|