It depends. You could go two ways.
1. Create a non-visual class (like you said)
or If the other applications you want to use this with are not VFP you could create a DLL.
But I'll explain the first way.
1.From the menu select new->class
2. Name you class and choose "custom"
3. Name you class library to be stored in (choose soemthing that doesn't exist if you want to isolate it)
4. Modify you new class lib and select the custom class.
5. From the menu you have the choice of adding either properties or methods.
And to run it :
IF !"myClassLib" $ SET("CLASSLIB"

SET CLASSLIB TO myClassLib.vcx ADDITIVE
ENDIF
oCustom = CREATEOBJECT("myCustomclass"

And to refer to it:
oCustom.myFunction1()
oCustom.myFunction3(date()) && With a parameter
Mike Gagnon