Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Modeless forms in a very large program
Message
From
24/01/2008 08:41:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01284682
Message ID:
01284927
Views:
11
>Question about using Modeless forms.
>
>We have 2 very large systems. The one I am working on now currently has 196 forms. The current wisdom seems to be that most if not all forms should be modeless. However, I can find no way to do that in a system this large. As I read the help file and with the programming attempts we have made here, there is no way to start a modeless form once you have run the READ EVENTS. Since I cannot load 200 forms at the start of the program, that seems to leave out any modless forms except for status windows where a process is running such as a reindex. We do have a startup screen that is modless that also serves as the system object holding many system settings.
>
>I was just wondering if I am missing something here or if anyone has any ideas on this. Thanks.

There is absolutely no need to keep 200 forms open at the same time - unless the user decides to.

When the user selects an option to open a form - the option might be in a menu option, press a button in another form, toolbar, select an item in a list, among others - then you invoke a DO FORM. When the user closes the form again, with the "x" in the upper-right corner, well, the form closes.

Read Events allows you, precisely, to open several forms at once. Just make sure each form uses a private DataEnvironment, to avoid conflicts between the forms.

For a quick test, just have two menu options, with two different DO FORM commands. The READ EVENTS will just wait for user input, which may include selecting a menu option.

For the final system, however, I would recommend a table-based approach - have a special form for "File | Open", which shows available forms (depending on the selected module, user rights, etc.), selected from a table according to your criteria.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform