Building an Application
by Bill Warner
This article is about using Alpha Five to develop an
application that can be used by people other than yourself. Whereas you might be
satisfied with opening a form to input data, other users might not be so inclined.
Keep in mind, if you're reading this, it's because you're more than just a data-entry
user. But other people around you probably aren't. So, it's important to make your
application as user-friendly as possible.
First of all, what do I mean by an "application"? This is simply a program that is
pretty much self-directed. For example, you could open Alpha, go to the Control Panel,
double-click on the form you want, and you're ready to go. But this could be a tedious
process for someone else. They don't want to have to think about what steps are
necessary to get where they need to be.
So, a very simple application is one in which a user opens the program by double-
clicking an icon on their desktop, and selects the destination they want from a menu.
Once they do this, they should be ready to go.
Therefore, a Main Menu is an integral part of a good application. So, how should this
be designed? Well, there are many ways to create a menu, but I have taken the best
ideas from several users to come up with a useful design.
A Main Menu should have some common components, such as:
. Button(s) to access the various data-entry forms or
browses.
. Button(s) to access other functions of the program,
such as updating indexes or viewing reports.
. A button to exit the program.
Other features that are useful:
. A hidden button or hot spot to allow you (the designer) to
access parts of the program (such as the Control Panel) that are not usually needed
by normal users. This should include a password known only by the designer.
. An indentifier so the user knows who to contact with questions
or problems.
. A seriel number or other means to identify the most recent
modification to the program.
This last item is important if you are creating an application for someone else, or if the application will be used on a network by more than one person.
In addition, I do the following with my Main Menu:
. I exclude both the menu bar and tool bar from the form, so the user can only do what the menu is designed to do, and can't get to the Control Panel by mistake.
. In the form properties, under Window, I give the menu a name (such as Main Menu). This will be displayed at the top of the form, rather than the table name. It looks a little more professional.
. I put a hidden button on the form with &C as the button's label, so the user cannot access other forms in the same table, including the default form (this works only in version 4.5).
The next question that arises is, which table should be used to create the Main Menu? While you could design this as a new form based on your current table (the table that will contain your data), many users have agreed that it is best to have a separate table that will be used exclusively for this menu (and other sub-menus that might be part of a more complex application). There are several advantages to doing this (see the Tips section for the tip on "dummy" tables).
When you create the menu form, you can call it MENU or MENU_MAIN. If you create other forms as sub-menus, call them something similar, such as MENU_UTILITIES. This way, all your menu forms are together.
When creating the buttons to access the forms, reports, etc., you can make the application a little easier to use by having a "hot" key for the name of each button. For example, the Sales button can be activated either by clicking it, or by pressing the CTRL key and then the S (to do this, go to the button properties, and in the button's name, put an ampersand (&) in front of the letter to be underlined; &Sales would show as Sales on the button). For users that are accustomed to using the keyboard rather than the mouse, this will be a welcome addition.
When the user first opens the application, the first thing you want them to see is the Main Menu. You can have the program open this form by selecting it in the Database Properties window, and checking the box that says Run on Load (you can also load the form in the AUTOEXEC script, but that is a subject for more advanced users). Also, you will want the form to load maximized. To do this, you can put
parentform.maximize()
in the OnInit action of the form.
Finally, I always leave the Main Menu form open. By that, I mean that I don't close it when going to another form or function. This way, when I close a form, the user is returned to the Main Menu again.
If your program is just a simple data-entry screen, adding a Main Menu should take less than an hour, and it is time well spent. Plus, this will give you a starting point for developing a more complex application in the future. And even if you are the only user, I think you'll find the added convenience is worth the minimal effort involved.
[PRINTER FRIENDLY VERSION]
|