Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal Form and Menu
Message
From
21/03/2005 10:36:38
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Title:
Modal Form and Menu
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00997839
Message ID:
00997839
Views:
58
I have a modeless form which calls a modal form. In the init of the modal form I haved:

PUSH MENU _sysmenu

The form contains a pageframe with 4 pages. All controls on the pages are readonly = .T. and enabled = .F. except for the first control on each page which is a listbox. It is enabled = .T. and when the user clicks on it or presses enter another display only modal form is displayed. The form is for display of information only. There is a command button on the bottom of the form (not on the pageframe or pages) which closes the form.

I am trying to enable a menu which is displayed while the modal form is active. I haved tried putting:

Do viewmenu.mpr

in the form's gotfocus, the first control on each page's gotfocus, the command button's gotfocus, etc. In all cases, the menu displays but all items are disabled. Finally I added another command button named cmdviewmenu on the form and in its click I put:

Do viewmenu.mpr

which works when the form is displayed and the user clicks on it. If I process the click from the init of the form though, the menu displays disabled. The menu is only enabled if I wait for the form to display, the listbox on page1 to get focus and then the user clicks on the cmdviewmenu button.

However, I want the menu to be enabled automatically and I do not want the user to have to click on any button to enable the menu.

Any ideas?
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Next
Reply
Map
View

Click here to load this message in the networking platform