>It can also be this one: on key label CTRL+C exec( iif( type("_screen.activeForm")='O','_screen.activeForm.doCtrlC()', '*' ) )
>
>You can also set the value for the on key command in the Activate() and Deactivate() of the form.
>
>Activate: on key label CTRL+C thisform.doCtrlC()
>Deactivate: on key label CTRL+C
>
>Most times I use an object reference variable for a form:
>
>do form frmMain name goMainWindow
>
>AFTER THE INIT of the form that variable can be used:
>
>on key label CTRL+C m.goMainWindow.doCtrlC()
>
>That will even work when the user has switched to e.g. a subform.
The small downside to this is you need a public variable for this - and then you need to make sure you destroy that variable when the form destroys. Also, you can't run this form twice at a time (because the variable will point to the most recent one and nothing will point to the old one). The upside is that you don't need to check whether _activeform exists, and whether it has the method you want.