andrew552717


Hi!

I need some help again.

I have small ocx in vb and I want to use it in vfp6.0. It is working in vb this way:

FK524ID1.SetIPAddress lpszIPAddress, CLng(txtPortNo.Text)

where lpszIPAddress = "192.168.1.201" and txtPortNo.Text="5005"

In VFP, when I dclick on "SetIpAddress" method in the Properties window, it is poping up new window with such text:

*** ActiveX Control Method ***
LPARAMETERS lpszipaddess, dwportnumber

How should I pass these two parameters to this olecontrol

Thanks

Andrew




Re: Olecontrol parameters

andrew


Sorry for posting it so many times! It did not show until now.

Andrew






Re: Olecontrol parameters

CetinBasoz

txtPortNoText = "5005"

.SetIPAddress("192.168.1.201", val(m.txtPortNoText))






Re: Olecontrol parameters

andrew

It is not working. Here is the error message: "OLE error code 0x80020005: Type mismatch.



Re: Olecontrol parameters

dni

You may try:
thisform.fk524ID1.SetIPAddress = "168.192.1.11","5500"
or
thisform.fk524ID1.object.SetIPAddress = "168.192.1.11","5500"





Re: Olecontrol parameters

andrew

Syntax error!



Re: Olecontrol parameters

dni

What is doing function CLng




Re: Olecontrol parameters

andrew

The CLng function converts an expression to type Long



Re: Olecontrol parameters

dni

thisform.fk524ID1.SetIPAddress = "168.192.1.11",CLng("5500")

thisform.fk524ID1.SetIPAddress = "168.192.1.11",CLng(5500)







Re: Olecontrol parameters

andrew

Syntax error!



Re: Olecontrol parameters

dni

What properties do you have available for object FK524ID1 in windows properties, tab DATA




Re: Olecontrol parameters

andrew

"Comment" and "Tag"



Re: Olecontrol parameters

dni

Sorry, I meant properties window(for object) from vfp, Tag Data: there should be some properties who can help to buid the command.




Re: Olecontrol parameters

andrew

when I click ickon on the form, representing Olecontrol in properties box, on roght side of the VFP window, there are tabs: "All", "Data", "Methods", "Layout", "Other". Under "Data" tab I have only these two entries: Comment - none and Tag - none(none is in right column). When I click on Comment on the bottom of Properties window I have text: "Stoers information about an object", when I click on Tag this text change to: "Stores any extra data needed for your program".



Re: Olecontrol parameters

dni

Aha, then then the function is in a dll file If yes you may use declare to use in vfp and also you need to know what is returning like INTEGER, SHORT, LONG, STRING...