* Notice that I use the g here for private variables. The g indicates that * these variables are visible/global to the entire application. * The only place where private variables are allowed to start with a g is the * main program. This usage of g is different from what's proposed in the * vfp-documentation (where it's advised for public variables.) private goMainWindow goMainWindow = NULLWhenever you create the form, use the NAME keyword.
do form MainWindow name goMainWindowIn the rest of your application, so also in the SKIPs of your menus, you can test for the datatype of the variable.
if vartype( m.goMainWindow, .f. ) = 'O' * form still exists m.goMainWindow.show() else * form does not (or no longer) exist endif