Working With Applications in R:BASE 5.0
     PRODUCT:  R:BASE                  VERSION: 5.X
     AREA   :  Other                   CATEGORY:  Programing in R:BASE
     A menu-driven application operates differently in Windows than it 
     does in a DOS environment. You will see some differences when running 
     your applications in R:BASE 5.0.  Most of the differences are a 
     direct result of operating under Windows instead of DOS. We want you 
     to be aware of these differences.
     The basic R:BASE interface had not changed in five years, so you and 
     your users were well used to the way applications and menus were 
     presented and your fingers automatically pressed the right keys in 
     the right places. Some of those keystrokes have changed in R:BASE 5.0.
     You should not need to modify any code in your existing applications. 
     Most applications run in R:BASE 5.0 exactly as written. The 
     differences in using your applications are as minimal as possible. 
     Where an option is no longer available, such as with the CHOOSE 
     command or some SET keywords, the old command is ignored. No 
     extraneous error messages are returned because of options that are 
     no longer available. Review the New Features and Commands section of 
     online Help for information about specific commands that have changed 
     or are no longer available. If you set keymaps or use playback files, 
     those might need to be changed because of menu and hot key changes.
     Both the look and the operation of menus has changed in R:BASE 5.0. 
     All menus now operate as Windows-style menus. You can use the mouse 
     to choose menu options, or you can use the keyboard. The keys used 
     to move around the menus and select items are different in R:BASE 
     5.0. Some hot keys have stayed the same, such as [Shift][F6] to 
     select all items, while others have changed to conform to Windows 
     standards, such as [F2] to indicate completion. Online help is always
     available in R:BASE 5.0. For a list of the available hot keys, press 
     [Shift][F1] and click the Hot Keys button.
     Menu Colors
     All menu colors are set in the Windows Control Panel. You can't set 
     these colors in your applications; each person running the 
     application might see different colored menus. By default, Windows 
     menus are black text on a white background with a dark blue highlight. 
     The dark blue highlight is the same color as the R:BASE default 
     screen color. While you cannot control the menu colors in your 
     application code, you can control the color of the R> prompt window 
     and your application background. For instance, you can change the 
     application background to a light color, such as cyan or white, so 
     that menu options are easier to read.
     Pop-up and Check Box Menus
     An R:BASE 5.0 pop-up menu always has black text on a white background. 
     The first item on the menu is highlighted. The MICRORIM_MENU_POS 
     variable cannot be used in 5.0 to change the location of the default 
     menu item. Choose an option from the menu by clicking on it, or use 
     the arrow keys to select the item and press [Enter]. Clicking on an 
     item selects it and immediately closes the menu. The [PgUp], [PgDn], 
     [Home], and [End] keys can also be used to move to a specific item on 
     the menu. Pop-up menus are always cleared from the screen; they cannot 
     be cascaded.
     In the DOS versions of R:BASE, you pressed [Enter] to choose the 
     different items on a check box menu. In Windows, pressing [Enter] 
     always indicates completion. Use the mouse or press [spacebar] in 
     R:BASE 5.0 to choose items from a check box menu, then press [Enter] 
     to accept your choices. Pressing [Enter] with no items selected on a 
     check box menu returns [Esc] to the menu choice variable.
     Menu Hot Keys
     The R:BASE 5.0 menus have standard Windows hot keys as indicated by 
     the underlined letter of the menu option. Pressing [Alt] plus the 
     letter selects a main menu option and drops down the menu. Once the 
     drop down menu is displayed, pressing the underlined letter of an 
     option selects and executes it. On menus without designated hot keys, 
     such as your application menus or pop-up menus, pressing the first 
     letter of a menu option selects that option.
     You can add hot keys to application menus in R:BASE 5.0. When defining 
     or modifying a menu, put the & character before the hot key letter. 
     Any letter in the menu option can be designated as the hot key. You 
     can add hot keys to both the main menu bar and the drop downs of pull 
     down type application menus. You cannot add hot keys to pop-up menus.
     Below are commonly asked questions and answers about applications.
     Question: I started Application Express to modify a 4.5++ application. 
     The application name did not appear on the menu, so I entered the name 
     in "Name." R:BASE created a new application instead of editing the 
     existing application.
     Answer:  While R:BASE 5.0 can run applications made with earlier 
     versions of R:BASE, those applications cannot be edited in Application 
     Express. R:BASE 5.0 Application Express has a completely new format. 
     The structure of your application is now stored in an appname.APW file 
     instead of an appname.API file. R:BASE 5.0 still makes an appname.APP 
     and an appname.APX file. You can't have both an old and a new 
     application with the same name in the same directory. The new 
     application will overwrite the runable files, appname.APP and 
     appname.APX, from the old application.
     Question: I like the new way to define application menus in 
     Application Express. But once I have defined the menu text, I can't 
     figure out how to define the menu actions since Application Express 
     no longer walks me through building the menus and actions.
     Answer: Once you have laid out your menus, highlight a menu item and 
     press the right mouse button. A menu pops up with a number of choices 
     including Menu Item Settings.... Choose Menu Item Settings... to 
     define the actions for a menu item. The right mouse button is also 
     used in QBE, and the Form, Report, and Label Designers to open pop-up 
     menus with more options.
     Question: When I run an application or command file, the R:BASE main 
     menu and tool bar go away 
     Answer: Running a command file or application in R:BASE 5.0 is a modal 
     operation. You must complete that process before doing any other 
     action in R:BASE 5.0. When you run an application, the R:BASE 5.0 main 
     menu is replaced by your application menu. The tool bar is removed 
     because you can't select any of the items on it.
     Question: My application used to start with the left most menu on the 
     pull-down main menu already dropped down. Now I need to select that 
     item on the main menu before the pull-down menu appears.
     Answer: This is standard operation for Windows menus. The main 
     application menu is initially displayed with no menu selected. A 
     drop-down menu is not displayed until the menu item is selected.
     Question: I have an application with pull-down menus. Some of the 
     main menu options, when selected, performed an action instead of 
     displaying a drop-down menu. Now, when I select the menu item, a drop 
     down menu opens with an "OK" option. When I choose it, the action is 
     Answer: Windows menus require that a drop-down menu of some type is 
     defined from a menu bar. In a new application, you can no longer 
     associate an action with a main menu option. A drop-down menu is 
     always defined; actions are assigned to the drop-down menu options. 
     So that old applications are compatible, the "OK" options is added to 
     menus with no pull-down menus.
     Question: When running my new application that I built in R:BASE 5.0, 
     some of my menus have the option (Continue) on them. I didn't put it 
     there, where did it come from?
     Answer: The (Continue) indicates a blank option on a menu. If you 
     pressed [Enter] after entering the last option of a drop-down menu, 
     you might have accidentally created a blank option. Modify the 
     application, select the blank option, click the right mouse button, 
     and then choose to delete the blank menu option.
     Question: I press [Esc] to exit my application, but it doesn't close. 
     I have to keep pressing [Esc], and finally the application exits.
     Answer: You need to press [Esc] three times to exit an application. 
     This is standard operation for Windows menus. The first [Esc] takes 
     you from a drop-down menu to the main menu bar, the second [Esc] 
     un-selects the main menu item, and the third [Esc] exits the main 
     menu and closes the application.
     Question: My horizontal menus are coming up as pop-ups. Why?
     Answer: Horizontal and vertical menu types (ROW and COLUMN) can no 
     longer be created in R:BASE 5.0 because they are not compatible in 
     a Windows program. To support older applications that still use these 
     menu types, R:BASE 5.0 automatically converts them to pop-up menus 
     when the application runs.
     Question: I try to close my application by double clicking on the 
     system menu like I do elsewhere in R:BASE 5.0. Nothing happens. 
     Clicking once doesn't even open the system menu.
     Answer: You cannot close the R> prompt window while an application is 
     running. The system menu is for the R> prompt, not for your 
     application. You must exit the application by pressing [Esc] or by 
     selecting an Exit option.
     Question: Can I use the status bar at the bottom of the screen to 
     display custom messages in my application? 
     Answer: Menu titles from CHOOSE commands are automatically placed in 
     the status bar. You cannot, however, use the WRITE command to display 
     a message on that line.
     Question: I have a menu choice in my application that uses the ZIP 
     command to run AUTOCHK to check the database before a backup or a 
     PACK. It isn't working. AUTOCHK is not running.
     Answer: AUTOCHK is no longer a separate .EXE file, it is now an R> 
     prompt command. Instead of using the ZIP command to start AUTOCHK, you 
     use the AUTOCHK command. AUTOCHK automatically checks the connected 
     database. Errors are returned to the R:BASE error variable.
     Question: I press [Enter] on a check box menu to select an item and 
     the menu is closed without anything being selected. How do I select 
     items in a check box menu?
     Answer: Press [spacebar] or use the mouse to select an item, then 
     press [Enter] to accept the selections. The [Enter] key in a Windows 
     application indicates that you are done selecting items. Use 
     [Shift][F6] to select all the items on a check box menu.
     Question: When using the TRACE command, I pressed [Shift][F5] so it 
     wouldn't stop at each nested RUN command, but instead the window 
     changed sizes. Why?
     Answer: [Shift][F5] is used to tile the open Windows. The new hot key 
     for skipping nested RUN commands is [Shift][F10]. To see the current 
     hot keys, press [Shift][F1], then click the Hot Keys button.
     Question: I use the MICRORIM_MENU_POS variables to select default 
     menu selections in my application. In R:BASE 5.0, the pop-up menus 
     come up with the first item selected even though I set the variables.
     Answer: That's correct. The menu position variables are ignored by 
     R:BASE 5.0.
     Question: I built a custom application with cascading menus. The 
     menus no longer cascade. Each menu is cleared from the screen and 
     they all appear in the same location. 
     Answer: Windows applications do not allow cascading menus. CASCADE and 
     a number of other options in the CHOOSE command are no longer 
     applicable in the Windows environment. The following options in the 
     CHOOSE command are ignored by R:BASE 5.0: CLEAR, CASCADE, RIGHT, 
     LEFT, RESET, NOCHG, and FOOTING. You can still make check box and 
     check sort menus, however, and return a value from a column not 
     included on the menu.
     Question: I set WALKMENU on so users could quickly move to choices on 
     pop-up menus by spelling the choice. It's not working any more. Only 
     the first letter of a pop-up menu is acting as a hot key regardless 
     of the setting for WALKMENU.
     Answer. WALKMENU is not applicable to a Windows application; it is 
     strictly a DOS-style menu interaction. Use the mouse and the menu 
     scroll bars to move on pop-up menus. Pressing the [Home], [End], 
     [PgUp], and [PgDn] keys also moves to choices on pop-up menus.
     Question: My users are always pressing [Enter] without selecting 
     anything on a check box menu, then the application does not work 
     correctly. Can I get the menus to work like they did in the DOS 
     versions of R:BASE? 
     Answer: You can use the command SET OLDMENUS ON from the R> prompt to 
     tell R:BASE 5.0 to display and work with menus in the same way as 
     R:PORT and R:BASE 4.5++.
     Question: Is there any way to change the main window title bar when 
     running an application? I'd like it to have a unique application name 
     rather than the name of the file being run.
     Answer: Use the new SET CAPTION command to specify the window title 
     when an application executes. Specify the title when creating a new 
     application, or edit the Startup block and add the title. Add the 
     command SET CAPTION 'this is my heading' to the startup block and 
     save the application.