andrew552717


I'm beginer in VFP programming.
I did register(regsrv32.exe) ocx file which I received with my new device. I placed icon(as activeX control) on my new form and now I'm trying to use it(communicate with device). I placed push button on this form and under command1-click few lines of code. I typed: Thisform.fk524.SetIPAddress='168.192.1.11' and when I click the button it is giving error message: "Unknown member fk524". Can somone help me with this problem

Thank you.
Andrew



Re: ocx problem

dni


I seems your form "does not know" who is fk524. You may need to declare it. Can you show some code





Re: ocx problem

andrew

There is nothing more, I'm just starting.




Re: ocx problem

CetinBasoz

Andrew,

When you drop an activex control on to a form VFP automatically names it OleControl1. Did you change its name property to fk524 If nt try thisform.Olecontrol1 instead.





Re: ocx problem

andrew

I did try both, first as oleControl1, next I changed name to fk524. This is VFP6.0



Re: ocx problem

dni

You need to know or create the object fk524 on the form. May be you missed a line of code from instructions or you have another name for control.




Re: ocx problem

andrew

it works wit this line:

=messagebox(type('thisform.fk524.name'))

it is returning "C"





Re: ocx problem

dni

You may select form and go in properties windows and from up combo box try to identify the object.




Re: ocx problem

Tamar E. Granor

As someone told you over on Tek-Tips, try adding Object after the object name and before the property:

ThisForm.fk524.Object.SetIPAddress = "168.192.1.11"

Tamar




Re: ocx problem

andrew

It is working now!
Thank you very much!


Andrew