OOP Menu

Topics: Attention VFPX Admins
Jan 3, 2007 at 4:59 PM
I want to use OOP Menu in my project for because with this system it's possible change the language of the menu without problem but.. I have a problem.

I don't use the _Screen but a form with As Top Level.
With normal menu I can use DO mymenu.mpr Whit This, .T. after setting the Top-Level Form in the property of menu.
With OOP Menu it's possible to do?
It's very useful for me use the OOP Menu but I need to insert it in the form setting like As Top Level with _Screen = OFF.

Thanks and sorry for my terrible english.
Jan 5, 2007 at 8:50 AM
Take a look at the demomenu5.prg sample program.

alter the last lines

  • Run the test form.

public oTestForm
do form TestForm name oTestForm

into the following:
public oTestForm
do form TestForm_TLF name oTestForm


This will show the menu in the supplied top level form

Sietse Wijnker.
Aug 28, 2007 at 2:29 PM
Has this example changed in the current release? The show() method of sfmenu no longer accepts a paramter. I am having an issue with the menu bars being disabled/enabled at different times without any code assigned to SkipFor. I believe it may have to do with the same issue mentioned above.
Aug 30, 2007 at 4:31 PM
In the current release, rather than passing an object reference to the Show method, you set the cFormName property to the name of a top-level form the menu is to be placed into before calling Show. See the code in SFMenu.Show to see how this is implemented if you are interested.

Aug 31, 2007 at 12:27 PM
Edited Aug 31, 2007 at 12:28 PM
In the version of sfmenu I have (2006.05.17), there is no reference to cFormName - is this the latest version (I downloaded it this week)? Here is the code form sfmenu.Show

  • Clear the old menu, define the new one if it hasn't already been, show all
  • the pads, and display the menu.

local lnI, ;
with This
set sysmenu to
if .Count = 0
endif .Count = 0
for lnI = 1 to .Count
loPad = .Item(lnI)
next lnI
set sysmenu automatic
Sep 13, 2007 at 4:53 PM
Can I create shortcut menu with these classes ?

Sorry for my English.
Sep 14, 2007 at 4:35 PM
Hi Dag.

Not without some changes, but you can use the _ShortcutMenu class in _Menu.vcx in the FFC folder of the VFP program directory to do so.

Sep 15, 2007 at 8:10 AM
Tnx Doug.

I did litle changes in Yours classes for creating shortcutmenu. May I send email with that for You ?

Sorry for my English.
Sep 24, 2007 at 5:28 PM
Yes, please, Dag. Send it to dhennig@stonefield.com.
Sep 25, 2007 at 1:46 PM
Hi Doug!
I send it. Tnx.
Nov 19, 2007 at 9:44 PM
Hi Dag.

I didn't receive it. Can you send it again with a subject "VFPX OOP Menu"? Thanks.

Nov 23, 2007 at 6:22 PM
Hi Doug!

I repeat it. .Check up a mail box.