Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menus and forms
Message
 
 
To
15/04/2005 18:31:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 6 SP3
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01005375
Message ID:
01005474
Views:
20
This message has been marked as the solution to the initial question of the thread.
Rich,

You sould use _Screen.ActiveForm to reference currently active form
POP MENU _msysmenu
IF TYPE("_Screen.ActiveForm") = "O"
    _Screen.ActiveForm.Release()
ENDIF
>I have a program which does some stuff, then modifies the menu bar and issues a READ EVENTS
>
>
>DO stuff && Verify login, set variables, etc
>DO myFirstMenu.mpr
>DO more stuff  && set some flags ,etc.
>READ EVENTS
>
>
>In one of the pads in MyFirstMenu I issue the command
DO nnn.app
>
>In this app I want to replace the menu and open a form. Both the new menu and the form have Close options as follows
>
>
&& NNN.PRG (main routine for NNN.APP)
>PUSH MENU _msysmenu
>DO namennn.mpr
>DO FORM namefind NAME oNameForm
>
>
>In the form NAMEFIND there is a CLOSE button with the following code
>POP MENU _msysmenu
>Thisform.release()
>
>In the menu bar there is also a close pad with the code
>POP MENU _msysmenu
>oNameForm.release()
>
>
>The CLOSE button on the form works just fine. However, the CLOSE option on the menu gives an error
Object ONAMEFORM is not found
>
>What am I doing wrong and how can I code this to have the menu option close the form?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform