Hi,

Running VFP 9.0, trying add a menu to my application. I have created the
menu, added three pull down items, File, Reports and Help. In the File menu
I put a Close option to exit the application. Here's the setup:

Prompt: \<File
Result: Submenu
Options:
Key Label: ALT+F
Key Text: ALT+F
Container: Left
Object: None
Pad Name: File

Menu Level: File
Prompt: \<Close
Result: Bar# _mfi_quit
Options:
Key Label: CTRL+F4
Key Text: CTRL+F4
Skip For: .F. (I tried leaving this blank originally, same result either
way.)
Resource: _mfi_close (I tried _mfi_exit too, didn't work either.)

Also, in the general options for the menu I turned on Top-Level Form.

In the Init() of my form I have: DO menus\mainmenu.mpr WITH THIS, .F.
(Tried .T. too)
Form.ShowWindow = 2 - As Top-Level Form.

When I run my application the menu appears like I expected except the Close
option is greyed out. I can't seem to find any property settings to adjust
this, any ideas? Is this the default state of a menu option and do I have
to control that in code somehow at run time?

All I'm trying to do at this point is be able to exit the application. The
other thing I want to do is include an About item in the Help menu, what's
the best way to do this and be able to display the version number of my
application, not just the version of VFP? Beyond that I'll want to add some
items for reports but I suspect those will be easy once I understand these
first issues better.

Thanks in advance,
Linn

Re: Issues with menus by Linn

Linn
Thu May 25 09:38:39 CDT 2006

Oh, and another question, what's the point of saving a menu to HTML? What's
the advantage of saving the contents of a menu as an HTML file?

Thanks,
Linn

"Linn Kubler" <lkubler@chartwellwisc2.com> wrote in message
news:OJjoWZAgGHA.2456@TK2MSFTNGP04.phx.gbl...
> Hi,
>
> Running VFP 9.0, trying add a menu to my application. I have created the
> menu, added three pull down items, File, Reports and Help. In the File
> menu I put a Close option to exit the application. Here's the setup:
>
> Prompt: \<File
> Result: Submenu
> Options:
> Key Label: ALT+F
> Key Text: ALT+F
> Container: Left
> Object: None
> Pad Name: File
>
> Menu Level: File
> Prompt: \<Close
> Result: Bar# _mfi_quit
> Options:
> Key Label: CTRL+F4
> Key Text: CTRL+F4
> Skip For: .F. (I tried leaving this blank originally, same result
> either way.)
> Resource: _mfi_close (I tried _mfi_exit too, didn't work either.)
>
> Also, in the general options for the menu I turned on Top-Level Form.
>
> In the Init() of my form I have: DO menus\mainmenu.mpr WITH THIS, .F.
> (Tried .T. too)
> Form.ShowWindow = 2 - As Top-Level Form.
>
> When I run my application the menu appears like I expected except the
> Close option is greyed out. I can't seem to find any property settings to
> adjust this, any ideas? Is this the default state of a menu option and do
> I have to control that in code somehow at run time?
>
> All I'm trying to do at this point is be able to exit the application.
> The other thing I want to do is include an About item in the Help menu,
> what's the best way to do this and be able to display the version number
> of my application, not just the version of VFP? Beyond that I'll want to
> add some items for reports but I suspect those will be easy once I
> understand these first issues better.
>
> Thanks in advance,
> Linn
>
>
>
>
>



Re: Issues with menus by Andrew

Andrew
Thu May 25 09:56:07 CDT 2006

"Linn Kubler" <lkubler@chartwellwisc2.com> wrote in message
news:%23kJ3qjAgGHA.4880@TK2MSFTNGP03.phx.gbl...
> Oh, and another question, what's the point of saving a menu to HTML?
> What's the advantage of saving the contents of a menu as an HTML file?

Writing user documentation perhaps?

--
regards
Andrew Howell



Re: Issues with menus by Dan

Dan
Thu May 25 10:21:08 CDT 2006

Hi Linn,

You can't use the _mfi_quit bar in a running application. As you see, it
goes disabled as soon as code starts running. You'll have to roll your own.
It should, at the very least, CLEAR EVENTS but in all likelihood it should
call your application object's shutdown/cleanup procedure.

To do help/about just call a form you've made from a menu. YOu can get your
application's version # from AGETFILEVERSION().

Dan

Linn Kubler wrote:
> Hi,
>
> Running VFP 9.0, trying add a menu to my application. I have created
> the menu, added three pull down items, File, Reports and Help. In
> the File menu I put a Close option to exit the application. Here's
> the setup:
>
> Prompt: \<File
> Result: Submenu
> Options:
> Key Label: ALT+F
> Key Text: ALT+F
> Container: Left
> Object: None
> Pad Name: File
>
> Menu Level: File
> Prompt: \<Close
> Result: Bar# _mfi_quit
> Options:
> Key Label: CTRL+F4
> Key Text: CTRL+F4
> Skip For: .F. (I tried leaving this blank originally, same result
> either way.)
> Resource: _mfi_close (I tried _mfi_exit too, didn't work either.)
>
> Also, in the general options for the menu I turned on Top-Level Form.
>
> In the Init() of my form I have: DO menus\mainmenu.mpr WITH THIS, .F.
> (Tried .T. too)
> Form.ShowWindow = 2 - As Top-Level Form.
>
> When I run my application the menu appears like I expected except the
> Close option is greyed out. I can't seem to find any property
> settings to adjust this, any ideas? Is this the default state of a
> menu option and do I have to control that in code somehow at run time?
>
> All I'm trying to do at this point is be able to exit the
> application. The other thing I want to do is include an About item
> in the Help menu, what's the best way to do this and be able to
> display the version number of my application, not just the version of
> VFP? Beyond that I'll want to add some items for reports but I
> suspect those will be easy once I understand these first issues
> better.
>
> Thanks in advance,
> Linn