|
-
August 26th, 2001, 04:54 AM
#1
Byte & MSComm
How Can I send a Byte using MSComm from visual Basic? Please provide code.
-
August 26th, 2001, 07:56 AM
#2
Re: Byte & MSComm
on MSDN I found this:
The Output property can transmit text data or binary data. To send text data using the Output property, you must specify a Variant that contains a string. To send binary data, you must pass a Variant which contains a byte array to the Output property.
Normally, if you are sending an ANSI string to an application, you can send it as text data. If you have data that contains embedded control characters, Null characters, etc., then you will want to pass it as binary data.
I think U can try so:
dim mybyte as byte
mybyte=1
'{...}
myMSCOMM.output = mybyte
else using bytes array
dim mybyte_array(1) as byte
mybyte_array(1)=1
'{...}
myMSCOMM.output = mybyte_array
hi,brt
<center>
<HR width=80%>
<img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
</center>
-
August 27th, 2001, 06:23 AM
#3
Re: Byte & MSComm
Thanks but this didn't work, I had a type mismatch error
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
|