MPAZ


I am new programmer in VFP. I am using a VFP 6.0

I have a VB ActiveX, I insert this control in a form in VFP.

It's OK.. but my problem is that one method of this control, recieve a parameter type VT_PRT.. And i don't know how means that and how this pass this parameters





Re: Activex in VFP

CetinBasoz


I haven't yet seen a COM property of VT_PRT type. Are you sure you didn't mistype it Would you provide some VB code using that property.




Re: Activex in VFP

MPAZ

In the class examinator appears:

Metodo (obj as VT_PTR)

The definition this method in my VB ocx is:

Public Function Init(obj As licence) As Boolean







Re: Activex in VFP

AndyKr

>> Metodo (obj as VT_PTR)

I found this definition in MSDN for "VT_PTR".

If the variable is VT_SAFEARRAY or VT_PTR, the lpValue field contains a pointer to a TYPEDESC that specifies the element type.

I am guessing that VT_PTR stands for "Variant_Pointer"....

Not sure if that helps at all. Your best bet is the documentation for the OCX.






Re: Activex in VFP

MPAZ

How to define a Pointer in VFP

I need pass a object how parameter to this method, but i don't know how to pass the pointer






Re: Activex in VFP

AndyKr

You pass a pointer by reference in VFP, but I don't believe that you can pass an object this way.

Sorry, but as I said, your best bet is the documentation, or the original authors.






Re: Activex in VFP

MPAZ

In first place, thanks for you answers.

I think that the parameters it's ok, in fact in the debugger of VFP I see the variables defines OK.

The problem is when i show the form, I Think that activex lost values. I use init method in form to initialize my activex.

Look this code

oX = CREATEOBJECT('myform')
oX.SHOW()

READ EVENTS

I don't know what exactly do Read Events, perhaps this instruccion reset muy activex control. In my class myform, i define this:

PROCEDURE INIT
LPARAMETER oLic
Local licencia
licencia=CREATEOBJECT('MyActivex.MiLic)
b=licencia.Init('licenciadecontrol.txt')
oLic=licencia
THIS.miobjeto.Init(oLic)


ENDPROC






Re: Activex in VFP

AndyKr

>> I don't know what exactly do Read Events, perhaps this instruccion reset muy activex control. In my class myform

READ EVENTS will not affect your control. All that it does is to put VFP into a wait state so that a modeless form, or a menu, remain active. If your form is modal you do not need the Read Events because modal forms suspend other activity until they are closed.