Hello,

I created an OCX file in C++. It contains a couple of functions each of which have arguments and return values.

After registering the OCX and putting it on the ToolBox in VB6....what must I do to be able to use the functions?

I have tried the following:
Dim Var1 As MyFunctLib.Myfunct

where Var1 is a new label
MyFunctLib is the name of the ocx library
Myfunct is the name of the OCX "Toolbox object"

Then I added the following line...
Var2 = Var1.GetData(1)

where Var2 is a new variable
GetData(1) is a function in the Myfunct Object

In this example, the C function I am accessing looks like this:
short GetData(short VarName)
{
if(VarName == 1)
return(1)
else
return(0)
}


Question: Is there something I need to do to "Reference" the object in the VB project before using it?

I cannot find any examples showing the implementation of an OCX function with parameters in VB. Any help is appreciated

Thanks Much!
Bob Bouthillier