Introduction to PowerBASIC
PowerBASIC is a programming language whose statements, functions, and syntax are based on the original BASIC programming language.

However, PowerBASIC incorporates significant improvements, including the ability to create graphical Windows programs and dynamic link libraries (DLLs). The small EXE/DLL footprint, high performance and lack of a runtime file have helped make PowerBASIC one of the most popular BASIC dialects on the market.

PowerBASIC also allows a programmer to directly access the Windows API, writing code at the "SDK" level but using familiar BASIC statements. It also allows the insertion of assembly code within an application.

PowerBASIC IDE
PowerBASIC programs are simply text files created using the PowerBASIC IDE (pbedit.exe). The IDE acts as both a source code text editor and a source code compiler, generating standard Windows EXEs and DLLs. The IDE additionally provides tools which automate or simplify source code creation/editing.

PowerBASIC creates both windows EXE applications as well as dynamic load libraries (DLLs). DLLs are simply libraries of subroutines or functions which may be called by executables, regardless of the language used to create the EXE. PowerBASIC DLLs have an industry reputation for high performance.

PBMain() - PowerBASIC Program Starting Point
Execution of the PowerBASIC programs starts with the PBMain() function. When the corresponding End Function is reached, the program ends.

This means that while PowerBASIC can be programmed to respond to Windows events, it is not considered an event driven programming language. The programmer must create the loop(s) which look for and respond to Windows events.

Multiple Source Code Files
Source code for a PowerBASIC program may be contained in one or more text files, with directions given to the compiler as to which files to include. This allows large amounts of source code to be broken into smaller, more manageable pieces.

Graphical User Interface (GUI)
Like any other Windows program, PowerBASIC can create a graphical user interface consisting of any of the common controls intrinsic to the Windows operating system. PowerBASIC specifically provides support for 22 controls, making it easier to use those controls in PowerBASIC applications.

The default means of creating graphical elements within a PowerBASIC program is for the programmer to use "DIALOG" and "CONTROL" source code statements to create windows (dialogs) and controls.

Managing GUI Elements - The CallBack Function
Controls placed on a form are windows themselves. PowerBASIC intercepts all operating system messages sent to the application dialogs and controls. It then makes them available to the programmer via special Callback functions. It is up to the programmer to write code to interpret and respond to all messages. This is similar to writing event code in a Visual Basic 6 program.

Other PowerBASIC Inc. Products
PowerBASIC Forms is a separate product which provides drag and drop GUI application creation capabilities. The source code it creates may be inserted into the PowerBASIC IDE. Though not required to create a GUI, PowerBASIC Forms can greatly speed up the development of a user interface.

This site does not cover the use of PowerBASIC Forms.

More information about PowerBASIC - it's features, capabilities, and limitations - can be found in my tutorial sections.