Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple READ EVENTS question
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095596
Message ID:
00095609
Views:
20
>The app I've developed is started with a main.prg that call my "main form" which is modeless and showWindow is set to in screen. I issue a READ EVENTS after calling this for to start event processing. The remaining forms that are instanciated throughout the app are all modal type. Now I want to make them modeless so I can create custom menus for each form. The problem I have now is that when I call one of these forms that I changed from Modal to Modeless, The zoom on by and don't respect event processing. What is the correct way to call these modeless forms so they stop for event processing. Do I need to put a READ EVENTS in after every DO FORM someform? or is only one READ EVENTS sufficient that I use in the main.prg. Obviously I'm missing something here, but I can't quite figure out how to get these forms to work correctly. Any help is appreciated! Thanks
>
>John.

John,

One READ EVENTS can handle the entire apps.

Also, to attach a Menu on each Form needs the Form’s ShowWindow property to be ‘As Top Level’, which is awkward in the sense. What I would suggest is that one Form with ShowWindow property set as ‘As Top Level’ is enough for the whole application. The Menu then will be attached to the said SDI Form where the menu handles the calling of all sub-forms on the entire app. Be sure that all sub-form’s ShowWindow property be set to ‘In Top Level’. The idea is as simple as this:

MAIN.PRG

SET commands here…

DO FORM MainForm

READ EVENTS

CLOSE ALL
CLEAR ALL
SET SYSMENU TO DEFAULT

If you want to have a specific menu to every form, you should create a separate menu to every menu then activate it at the Activate Event of every sub-forms. But this approach, I would say is hard to maintain.

What we are doing is that, all necessary Menu Pads and Bars are included in one Menu, and we just disabled the specific bar or pad and only be enabled when necessary.

Be sure that the MainMenu contains a bar with Command CLEAR EVENTS to exit the app.

Hope this helps.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Reply
Map
View

Click here to load this message in the networking platform