>I Have a top level form and a menu is attached with it.
>The last pad of this menu is EXIT , now i want to relese the
>form through This pad selection,
>I have placed the Thisform.Release code in pad command
>but on selecting the pad a error message is generated
>that "Thisform" can be used only in form methord.
>
>Looking for quick solution.
THISFORM only works from within a class. Menu's aren't classes, so this doesn't work. What you need is some other reference to the form. Maybe _Vfp.ActiveForm will work. In this case you can simply do a
_VFP.ActiveForm.Release()
This really depends on how you instantiate your form. Let's say you instantiate it like so:
DO FORM MyForm NAME oMainForm
You can now release the form from the menu like so:
oMainForm.Release()
Markus