Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamically adding menu options
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00339109
Message ID:
00339119
Views:
19
>I'm looking for the most efficient way of adding menu options to a menu based upon the instanciated forms. There are several MDI forms in this app. Once the users have 15 to 20 forms active on the screen, they can't find the form they want. The users want a window menu option that would show all forms and allow them to switch between them.
>
>How can this be best handled? i.e. retrofitting and speed.
>
>Should it be keyed off the forms collection of the _Screen or in the init of the forms?
>
>Thank

Why don't you just add the VFP System menu pad Window to your menu? In the VFP Help, click the Index Tab, and type in system menu names. Double-click that entry. The name for that menu pad is _MSM_WINDO. Add that to your menu bar. This system menu pad will maintain a list of all the open forms for you, and the users can switch forms by clickin on the one they want.

The code that the menu designer created for this pad is:
DEFINE PAD _msm_windo OF _MSYSMENU PROMPT "\<Window" COLOR SCHEME 3 ;
	KEY ALT+W, "" ;
	MESSAGE "Manipulates windows, displays Command and View windows"

ON PAD _msm_windo OF _MSYSMENU ACTIVATE POPUP _mwindow

DEFINE POPUP _mwindow MARGIN RELATIVE SHADOW COLOR SCHEME 4

DEFINE BAR _mwi_arran OF _mwindow PROMPT "\<Arrange All" ;
	MESSAGE "Arranges windows as non-overlapping tiles"
DEFINE BAR _mwi_sp100 OF _mwindow PROMPT "\-"
DEFINE BAR _mwi_showa OF _mwindow PROMPT "Sh\<ow All" ;
	MESSAGE "Shows all hidden windows"
DEFINE BAR _mwi_clear OF _mwindow PROMPT "Clea\<r" ;
	MESSAGE "Clears text from the application workspace or the current output window"
DEFINE BAR _mwi_rotat OF _mwindow PROMPT "C\<ycle" ;
	KEY CTRL+F1, "Ctrl+F1" ;
	MESSAGE "Cycles through all open windows"
DEFINE BAR _mwi_sp200 OF _mwindow PROMPT "\-"
DEFINE BAR 7 OF _mwindow PROMPT "\<Data Session" ;
	SKIP FOR oApp.App_AuthLevel <> 1 ;
	MESSAGE "Displays the Data Session window"
ON SELECTION BAR 7 OF _mwindow activate window view
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform