>Hi Ed,
>My form is modeless. What I was hoping for was a way to close it without clicking on the X or by using CTRL+F4. Is there a way to close the form with a button?
Sure - if the button is one the form, have the button execute
thisform.release() in it's Click event. If it's on a different form, save a reference to the form (create a reference to the new form in a memvar using the NAME clause of DO FORM, and save that to a property of the form that owns the close button:
DO FORM <i>Blah</i> NAME oWoof
thisform.oBlahRef = oWoof
oWoof = NULL
In the close button on the parent form, reference the child form through the saved property to trigger its release:
IF TYPE('thisform.oBlahRef') = 'O' AND ! ISNULL(thisform.oBlahRef)
=thisform.oBlahRef.Release()
thisform.oBlahRef = NULL
ENDIF