************************************* * * * DB/C Newsletter * * June 2004 * * * ************************************* News and Comments DB/C DX 13.1 is nearing completion. We will begin formal beta testing in July, so if you are interested in participating in testing, contact us at support@dbcsoftware.com. When DB/C programmers begin investigating a conversion of their character mode programs to GUI, the first thing they usually try to do is to replicate the login and menu programs. Interestingly, the menu navigation aspect of an application is one of the areas where there is a significant difference between typical character mode and GUI programs. This month's newsletter provides a short overview of a very simple sample program that provides the login and main menu functions in a GUI DB/C DX program. The sample program and menu data file can be found at our web site under the heading "Sample GUI menu program". don.wills@dbcsoftware.com ****************************************************************************** A Sample GUI Main Menu Program Graphical user interface (GUI) programs are very different from character mode programs. At the user interface level, the actions and reactions of a user are quite different. And the optional use of the mouse introduces a random nature to the handling of actions. These user interface attributes cause major structural differences between GUI and character mode programs. Countering these differences is the desire to make the GUI programs work as much the same as existing KEYIN/DISPLAY programs as possible. This is desirable to minimize the shock of change for existing users. The GUI/character-mode differences are very evident in the main menu functions of most business-oriented applications. In fact, many graphical application systems actually dispense with the whole concept of a main menu. That's usually not acceptable for traditional DB/C DX based applications. The sample GUI main menu program provides two primary functions. The first is to display a user name and password login dialog. The second function is the main menu navigation with selection/execution of programs. The login dialog is completely contained within the routine named 'showroutine' which is at the bottom of source file ('menu.prg'). We won't discuss it further other than to point out that you must enter 'pass' in the password field to successfully login. The menu navigation function is handled via two adjacent list boxes. The left listbox contains the high-level menu options. The right listbox contains the lower-level menu options that are associated with the selected item in the left listbox. The lines in the right listbox are repopulated as the selected line changes in the left listbox. It's much easier to understand visually than it is to describe in words. The items in the menus, along with the programs to be executed, are contained in a separate text file. This file is named 'menudemo.txt'. Here are the contents of that file: 1Main Processing 2Enter Orders XORDER 2Enter Payments XPAYMENT 2Enter Credits 2Month End Processing 1File Maintenance 2Customer File 2Order File 2Inventory File 1Reports 2Sales Analysis 2Inventory Report The first character is '1', '2' or 'X'. '1' signifies that the following text is a high-level menu item. '2' signifies that the following text is a low-level menu item associated with the previous '1' record. The 'X' signifies that the following text is the name of a program to chain to when the previous '1' or '2' menu item is double clicked. There is nothing special about the actual DB/C DX code. It runs fine in DB/C DX 13.0 or later. And it has a lot of room for improvement. If you find any bugs, or have any comments or suggestions for enhancements, please direct them to dbctalk. ****************************************************************************** DB/C DX Class Schedule Class: DB/C DX Fundamentals Date: September, 2004 Location: to be determined For information, send email to admin@dbcsoftware.com. ****************************************************************************** Subscribing to the DB/C Newsletter If you don't already have the DB/C Newsletter delivered to your email address and would like to have it emailed to you monthly, just send an email message to 'dbcnews-subscribe@dbcsoftware.com'. The newsletter will be delivered to the email address from which the message was sent.