>I mean if I have a shortcut menu and I want one of the options to return a .t. is something happened successfully, can I do that?
Nor really "return", but you declare the variable before calling the menu (or use an object property to store the result value) and check it after the menu call.
DEFINE POPUP shortcut SHORTCUT RELATIVE FROM MROW(),MCOL()
DEFINE BAR 1 OF shortcut PROMPT "Success"
DEFINE BAR 2 OF shortcut PROMPT "Bummer"
ON SELECTION BAR 1 OF shortcut myvariable = .t.
ON SELECTION BAR 2 OF shortcut myvariable =.f.
ACTIVATE POPUP shortcut
myvariable = .f.
do menu1.mpr
WAIT WINDOW IIF (!empty(myvariable), "Success!", "Bummer...")
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison