Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Executing a menu command from a form?
Message
From
02/04/1998 11:38:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00088965
Message ID:
00088974
Views:
37
>>>Is there anyway to execute a menu item programmatically from a form?
>>>There is a special situation where I need this to happen.
>>>
>>>TIA,
>>>
>>>James
>>
>>Why can't you expicitly call command which is behind the menu bar item?
>
>Here is my situation. I am trying to run a utility program from a form that calls a routine that closes down any open screens to ensure all tables are closed before the utility runs. I can run this utility from the menu and all the forms shutdown properly. If I run it from the form, the form I run it from closes down, but no other open forms will close. Maybe this is not possible, but I thought I would try to see if there is a way to accomplish this. Now that I think about it, I don't think running the menu item code from the form would work either. Probably would be the same situation. Then you may say, since the utility shuts down the forms from the menu, then don't put it on the form. I have a startup form that uses the ctListBar control from dbi-Tech (outlook style bar) and I have utilities under one of the bars and I run the utility from there.
>
>Anyway, bottom line is, the forms will not close when run from the form, but the forms do close when run from the menu.
>
>Any help would be appreciate! Either I am missing something or this is just not possible from a form.
>
>Thanks for any insight you can give me.
>
>James
Now,
You could get forms collection and release them before releasing the current. Still for doing a menu click you may also want to coordinate a toolbar with menu (sample in solutions.app). Then all you need would be something like "oToolbar.cmdCloseAll.click".
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform