MsComm Problem  
Author Message
Tariq Mehmood

PostPosted: Visual FoxPro General, MsComm Problem Top

My dear Professor,

Thank you very for helping me on many forums.
Now I am facing a serious problem about MsComm.
I am using MsComm with following properties

Commport :1
Setting :4800,n,8,1
Handshaking :0,ComNone

InBufferSize :1024
OutBufferSize :512
RThreshold :0
SThreadhold :0
InPutLen :0
EoFEnalbe : UnMark

PartiyReplace :
NullDiscart :Unmark
RTSEnable :Unmark
DTREanable :Marked

I do not use any event of MsComm. Following commands are under a command button


Mscomm receives weight from Input Device called HB-8210.
Everything work fine in VFP 6 on WIndows 98 platform.

***Now problem details

When I run this form, with same settings, on Windows Xp then MsComm Port opens


When I put the cursor on followng line
Then it show tooltip having value as under
"# 30t NT ##"
But the above value does not go to any variable or textbox

What is wrong

Another factor is Hyper Terminal, when I connect Hyper Terminal it show values as
"# 30t NT ##"

It seems there is no problem in Hardawre. May VFP or Windows are respobsible.

Please help me to show input data in any varible, so I could display it into textbox.

Thanks in anticipation

Visual FoxPro1  

PostPosted: Visual FoxPro General, MsComm Problem Top

You may go to check port status, after you ran once your software and not quit vfp, in control panel>system>hardware>device manager>ports. You may also configure the port from there.

Don Higgins

PostPosted: Visual FoxPro General, MsComm Problem Top

First, I would put this in the oncomm event

* name of text box

thisform.txtWeightMeasurement.Value = thisform.mscomm.input

Second, use better variable naming conventions, the variable 'abc' is not a good name. A local variable called:

lcWeightMeasurement makes more sense.

Don Higgins

My race car pictures