844.TXT
     =====================================================================
     Using Forms as Application Menus
     =====================================================================
     PRODUCT:  R:BASE                     VERSION:  5.5 Windows or higher
     =====================================================================
     CATALOG:  FORMS, REPORTS & LABELS       AREA:  Forms
     =====================================================================
 
     In R:BASE for Windows, forms are more than just a tool to add and
     edit data. A form can display important information as well as being
     a data gathering aspect of your application. In an application, a form
     can be used:
 
       as the application menu
       to prompt users to enter required data for a process
       to display messages
       to display graphical images
       as a check-off list through radio buttons or checkboxes
 
     A form can be as complex or as simple as you like. Using the GUI form
     features of push buttons, radio buttons, check boxes, different font
     sizes and styles, colored boxes, and 3-D boxes, you can customize the
     look of a form to fit any application. Application developers looking
     for an alternative to the standard menu driven application interface
     should consider using a form as the application main menu. 
 
     Using a form as a menu provides a different visual appeal to the
     application. Pulldown menus are typical for Windows applications, but
     it can be difficult to fit application choices into the standard
     pulldown menu setup. Using a form removes the limitations and
     restrictions imposed by trying to fit application menus into a strict
     Windows-style menu structure.
 
     The application provided with Microrim's Submit THIS! Internet product
     is designed with a form as the main application menu. This form uses
     3-D boxes to group the menu choices together into sections much as
     you might see on a pulldown menu. The 3-D boxes give the form a
     sculptured look.
 
     You might want more buttons and options than can be displayed on a
     single screen. Forms can scroll both vertically and horizontally, so
     you can simply expand the size of the menu by placing objects off the
     initial screen and the user then scrolls to the additional buttons.
     The problem with this method, is the user may not be aware they need
     to scroll the form. An alternative to scrolling the form is to use a
     second form. The second form menu is called from a "more" button.
     
     Push buttons do not need to be arranged in horizontal or vertical
     lines. 
 
 
     You can make use of colored boxes, different styles of 3-D boxes, push
     buttons, radio buttons, check boxes, graphical images, and differing
     font sizes and colors for text objects to create unique and visually
     appealing menus for your applications. Changing the properties of the
     3-D boxes can create some interesting effects. Figure 8 shows eight
     different styles you can create just by modifying the properties of
     3-D boxes. Combine these different 3-D styles with colored boxes,
     push buttons and graphical images for some exciting visual effects. 
 
 
     Use your imagination when creating form menus to create design
     original and exciting applications.
 
     Creating a Form Menu
     How do you create your own form menu? The first step is to make a
     table on which to base the form. Because the form is acting as a
     menu and not adding or editing data in a database table, it is
     easiest to associate the form menu with a special table in the
     database that has been added just for this purpose. This table is
     called a "dummy" table because it is not used to store data; the
     tables purpose is simply to allow you to create forms. You can create
     this table using the Database Designer (RBDefine) or by using a
     CREATE TABLE command in the "R:BASE R> Prompt" window. The CREATE
     TABLE command would look like this:
 
     CREATE TABLE formtable (column1 INTEGER)
 
     Once you have created the table, you want to load one row of data. By
     adding a row of data to the table, you can call the form menus with
     the EDIT USING command. For example,
 
     EDIT USING MainMenu AT 1,1,640,410 CAPTION 'My Application' 
 
     After the table is created, start building your form menus. There is
     no limit to the number of forms that can be associated with a table.
     All of your form menus for a given database and application can be
     associated with this one table. Building a form as an application
     menu is not difficult. It is just a form with push buttons used to
     provide the menu options to the user. Other form objects are added
     for visual appeal.
 
     Here are some tips to make designing the form menu easier:
 
       Layout the form on paper first. Decide what buttons and menu
       actions to put on the form. Note the action that will be assigned
       for each button and the file name for action code. You don't need
       to write the codes now, that can be done later. When you build
       the form you can assign the appropriate file name as the button
       action even if the file does not yet exist.
 
       Design the form with no menus. Choose Layout: Form Settings and
       specify the following:
 
     Uncheck the option "Runtime Toolbar."
     Uncheck the option "Use Form for Entering Data."
     Click the "Change Edit Menu" button and select the "No Menu" option.
 
       Use Layout: Resolution Guidelines to position objects correctly for
       a particular screen resolution. This is especially helpful when
       designing forms for standard resolution (640x480) on a high
       resolution (1024x768) monitor. Before distributing the form, be
       sure to remove the screen area (click on the "X" in the upper left
       corner of the area and press [Delete]). 
 
       Place 3-D boxes and colored boxes that surround groups of objects
       after the objects have been placed and aligned. This way you can
       click and drag to select the group of objects. When you have a box
       in the background, the click selects the box.
 
       Use the sizing and alignment options on the format menu to quickly
       position and equally size a group of objects.
 
       When using dark backgrounds for your form, select the form
       background color as the final step in the form creation process.
       The indicators to show which object is selected don't show up well
       on a dark background.
 
       Use the grid to equally space objects. Use the arrow keys and X,Y
       coordinates displayed on the status bar to move objects a pixel at
       a time in any direction.
 
       Include a push button calling the pre-defined Exit action. This
       makes it easy for users to close the application.
 
       Add an entry/exit procedure (EEP) on row entry that blanks out the
       status bar using the WRITE command. For example,
 
      WRITE ' ' AT BAR NOCHG
      RETURN
 
     You can have other EEPs write messages to the status bar when a user
     selects an option. Or, use the variable MICRORIM_NOSTATUS to
     completely turn off the status bar on the form. 
 
     Applications that use forms as menus can’t be written with application
     express, you must write the application code yourself. The application
     code can be very simple or quite complex. The push button actions can
     call other menus, run application code, or call a form for data entry.
     Another option is to have the button run code that sets a variable,
     exits the menu form, returns to the application, and does the
     requested processing. This option can provide more stability and
     better use of memory. Sometimes too, you do not want the form menu to
     remain on the screen while you are prompting for other information.
     By closing the form menu you have complete control over your
     application display.
 
     You'll need to be familiar with some basic R:BASE programming commands
     such as SET VAR, IF...THEN, and CASE...SWITCH. Entry/Exit procedures
     are just application or command files that are called from a form
     object. They have additional commands specific to form usage and
     these additional commands are listed in the Reference Manual under the
     section "Entry/Exit Procedures". Refer to the New Features Addendum
     for the current EDIT USING formname syntax as well as other related
     commands such as CLOSEWINDOW. In addition to the Reference Manual and
     the New Features Addendum, you can find information about programming
     in online Help.