GUI-Build, Beta 2.3 2001 Daniel L. Nice. Build 6.6.2001 GUI-Build is a form-designer to speed the developement of software for the graphics routines I have developed for QBX 7.1. The most notable program to use the graphics routines is DosStart (currently at version 1.8f). No software created by this program may be sold for ANY amount, without consent of the author. No liability is assumed by the author. Use of this software and any source-code it generates is at your own risk. Installation: This archive contains sub-directories, so make sure you unzip properly. For PKZIP 2.04g (DOS): pkunzip -d guibuild.zip GUI-Build will run right out of its directory. Change to there and type 'GUIBUILD'. The DEMO directory contains a simple "Flash Card" program which demonstrates coding in QBX with the graphics routines. You can modify FLASH.BAS and/or past code into it from GUI-Build. GRAPHICS.TXT is the documentation for the graphics routines, explaining what each function does and how to call them. It also explains how to set up graphics objects (buttons, windows, etc) WITHOUT using GUI-Build, which you may do to tweak the output from GUI-Build. PRINT THE DOCUMENTATION! The Graphics documentation is also available as on-line help, accessed via the CONTENTS in GUI-Build. While coding, you will still need to have the documentation printed, however, as you only run GUI-Build to design the forms. GRAPHICS.WP is in WordPerfect 5.0 for DOS format, which should be readable by almost any wordprocessor, including WordPerfect 6.x for DOS. Usage: GUI-Build is meant to be logical, but on-line help is available to help you. Move the mouse to the top of the screen to display the hidden menu-bar, from which you can start designing your forms. There is also a toolbar that comes up when you move your mouse to the RIGHT side of the screen. What is a form? Users of VisualBASIC know that a form is a window and the controls on it, whether they be buttons, list-boxes, etc. This program does not emulate VisualBASIC's approach to programming (which is backwards). Rather, it eliminates the tedious entry of numbers into the mouse-control array(s) to create the objects. Instead, GUI-Build codes the graphics for you. When a form is done, you need only to paste the code into your QBX program. After that, you can manually tweak what GUI-Build has done, and you must enter code so that your form responds to events as they occur. Graphics routines? QBX? QBX is Microsoft QuickBASIC Extended 7.1. It is an enhanced QuickBASIC. While GUI-Build does not need QBX to run, the output will be useless without it. The "graphics routines" are a bunch of SUB/FUNCTIONs written in QBX and precompiled into a library. They handle drawing and management of the controls placed on a form as well as other "objects" (Title-Bars, Buttons, Check-Boxes, etc). They also provide functions that make graphical programming easier, such as a dialogue box function and a file dialogue. How do I use all this stuff? GUI-Build is a front-end to make code for the graphics routines. You still need to know how to use them, though. Provided is the documentation for the routines, in the file GRAPHICS.TXT. *Print the documentation!! (if you have WordPerfect, use GRAPHICS.WP) Also provided is a demo program that uses the graphics routines with source. It is called FLASH.BAS. The code is commented. To view/run FLASH.BAS, load QBX like this: QBX /h /l graphics flash Note: To create your own program(s), you can just modify FLASH.BAS and save it as another file name. Brief overview of how to use the graphics routines/GUI-Build output: The graphics routines allow you to make event-driven, graphical programs using QBX. You tell them what type of objects to draw, where to draw them, and how to draw them. You also tell them what event to look for, and what NUMBER to send you when this event occurs. You do all this by entering values into the "Mouse Arrays", collectivly known as the "Mouse Overlay". GUI-Build lets you graphically place initial values into these arrays, but to write good interactive programs, you will still need to know what possitions in the arrays store what types of values. The graphics routines are centered on the MOUSE() function. The MOUSE function is polled by your program (usually in a DO..LOOP) just like INKEY$. In fact, it takes over polling the keyboard, so you don't use INKEY$. This is how objects can stay "active" (MOUSE is constantly being called), and it is also how values are returned when objects are activated. Just by setting up the mouse-overlay and polling the mouse function, users can type text into a field, select items in a list-box, choose items from a Drop-Down box, check checkboxes, and more. While all these events could be trapped, you will probably ignore them. When an event occurs that you want to react to, such as the pressing of an "OK" button, you can look for the number you assigned to the button object, then READ from the mouse-overlay information the user has entered and/or choices he has made. You see, the mouse-overlay arrays store EVERYTHING about each object, including text the user types into a field, selections he made in a listbox, or the item chosen from a drop-down box. You can also make changes to objects on the current form, then tell the mouse sub to re-draw them. This is done by first changing the mouse overlay, then marking the object as UNREFRESHED. When you next poll the MOUSE function, it will re-draw any unrefreshed objects, and mark them as refreshed. Objects that manage a lot of information, like list-boxes and Drop-Down boxes cannot store all of the data they manage in memory. Instead, they use a RANDOM file. Both objects use the same type of random file, and GUI-Build has an editor for these on the "Utilities" menu called "LB/DD Random File Editor". You can use list-boxes to put information onto the screen by placing data into a random file of this format. The graphics documentation explains it. The above should help put what you see in the graphics documentation into perspective, especially combined with the source-code in FLASH.BAS. -------------------------------------------------------------------------- Have problems? Find a bug? Have questions? Have suggestions? Contact me! Daniel L. Nice Email: dnice@icdc.com AIM: danielnice