Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSComm documentation 1

Status
Not open for further replies.

KornGeek

Programmer
Aug 1, 2002
1,961
US
I'm making progress with my Serial Communications project using the MSComm control. Unfortunately, my VB help (as well as several other help systems on my computer) seems to be messed up. Does anybody have a link where I can find some documentation on how to use this control?

Specifically, I'm trying to figure out how to read only some bytes out of the buffer. Is there a way to do this, or do I need to do some redesign on my program?

I appreciate help either with my current issue or with finding documentation that will help with this and future issues.

Thank you very much.
 
Thank you for the second time today. Great response time too.

For those who were wondering, the InputLen property can be used to set the number of bytes to receive.
 
yes.. yes it can

and the RThreshold determines the amount of bytes before the oncomm event is fired!!

enjoy!

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
A General Guide To Excel in VB FAQ222-3383
File Formats Galore @
 
FYI KornGeek,

If you read the MSComm control's input property to a variable of type Byte Array you can pick off any of the specific bytes that you wish IE

Dim bytInput() As Byte

bytInput = MSComm1.Input

Just thought I would pass that along.

If you choose to battle wits with the witless be prepared to lose.

[cheers]
 
Foada,
that was my second choice for how to do this. I prefer the other method (in this instance) because it results in fewer changes to my existing code.

ADoozer,
you mentioned in my other thread that InBufferCount can be misleading. How can it be misleading, and what do you recommend as a workaround?

Thank you both for your time and effort.
 
have a look at my threads (it may just be that my understanding was off but it had me in knotts for days)

thread222-501846
thread222-507184

good luck!

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
A General Guide To Excel in VB FAQ222-3383
File Formats Galore @
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top