oDll=CREATEOBJECT('d1.interface') lcnt=oDll.InterInit(thisform) RELEASE oDll DEFINE CLASS Interface AS CUSTOM OLEPUBLIC PROCEDURE InterInit PARAMETERS pForm as Form WITH pForm .AddObject('myContainer','Container') && Add a Container to the form .myContainer.height=150 .myContainer.width=150 .myContainer.top=1 .myContainer.left=1 .myContainer.visible=.T. ENDWITH RETURN pForm.myContainer ENDPROC ENDDEFINE>
return "myContainer"
and let the form reference it that way. This might help prevent dangling object references.