SET PROCEDURE TO cCustomForm.PRG SET CLASSLIB TO struct.vcx loForms = CREATEOBJECT("cCustomForms") IF loForms.CreateForm(190000,215000,"MyPaper",GETPRINTER()) Messagebox("Custom Form Created Sucefull") ELSE Messagebox("Error Creating Form") ENDIF loForms = NULL RELEASE loForms>This works in VFP8 Service Pack 1:
DEFINE CLASS forminfo as Struct nflags = 0 pName = NULL sizel = NULL rectl = NULL cMembers = "ul:nflags, pz:pName, o:sizel, o:rectl" PROCEDURE init this.sizel = CREATEOBJECT("PSIZE") this.rectl = CREATEOBJECT("PRECT") DODEFAULT() ENDPROC ENDDEFINE