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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with ocx

Status
Not open for further replies.

and0b

MIS
Mar 27, 2007
51
US
I'm beginer in VFP programming.
I did register(regsrv32.exe) ocx file 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 typed: Thisform.fk524.SetIPAddress='168.192.1.11' and when I run it it is giving error message: "Unknown member fk524". Can somone help me with this problem?

Thank you.
Andrew
 
I believe the ActiveX object is instantiated, but the problem now is in accessing its properties/methods. Sometimes you have to use object for ActiveX, e.g.

thisform.myActiveX.Object.Property = value

It would be helpful to see VB code.
 
Here is fragment of vb code:

lpszIPAddress = txtIPAddress
FK524.SetIPAddress lpszIPAddress, CLng(txtPortNo.Text)
If FK524.OpenCommPort(3) = True Then
 
Ok, I got the problem solved!

ThisForm.fk524.Object.SetIPAddress = "168.192.1.11"

Works.

Thank you very much for your help!
 
Strange, that it works this way. The code above clearly suggests, that SetIPAddress is a method accepting two parameters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top