LOCAL oFormInst oFormInst = CreateObject("clFormClass") oFormInst.Visible=.T. *!* No code gets executed until the form is hidden. *!* The Ok button in your class takes care of that, by setting the form's *!* visible property to False. The Cancel button also does that, but it *!* first sets the IsCanceled Property to True *!* Then, to read your return values: IF !oFormInst.IsCanceled DO CASE CASE oFormInst.Text1.Value = "Some Text" *!* Process results here CASE ... ENDCASE ENDIFYou can either release oFormInst manually, or wait until it falls out of scope and releases itself.