Hi Vikram, There are probably much better ways to do what you are trying to do, but its hard to suggest them fro the sample.
But for a quick answer: PUBLIC SUB Form_Close() DIM retval AS Integer IF NOT ME.Visible THEN ME.Close RETURN ENDIF retval = Message.Question("Are you sure you want to exit FormA?", "Yes", "No") IF retval = 1 ME.Close ELSE STOP EVENT END IF END -- best regards Bruce Bruen ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user