DVX BASIC IDE Guide

DVX BASIC is a Visual BASIC development environment for the DVX GUI System. It provides a VB3-style integrated development environment with a code editor, form designer, project system, and a full interactive debugger -- all running natively on DOS under the DVX windowing system.

This guide covers every feature of the IDE: menus, toolbar, editor, form designer, project management, debugger, and auxiliary windows.

Table of Contents

1. Overview

The DVX BASIC IDE is modeled after Visual Basic 3.0. It consists of several floating windows arranged on the DVX desktop:

The IDE compiles BASIC source into bytecode and runs it in an integrated virtual machine (VM). Programs execute in cooperative slices (10,000 VM steps per slice), yielding to the DVX event loop between slices so the GUI remains responsive.

File Menu

Menu ItemShortcutDescription
New Project...Create a new DVX BASIC project.
Open Project...Open an existing .dbp project file.
Save ProjectSave the current project file to disk.
Close ProjectClose the current project (prompts to save unsaved changes).

Project Properties...Edit project metadata (name, author, version, startup form, icon, etc.).

Add File...Ctrl+OAdd a .bas or .frm file to the project. If no project is open, creates an implicit project from the file.
Save FileCtrl+SSave the active file to disk.
Save AllSave all modified files in the project.

Remove FileRemove the selected file from the project (prompts to save if modified).

ExitClose the IDE (prompts to save unsaved changes).

Edit Menu

Menu ItemShortcutDescription
CutCtrl+XCut selected text to the clipboard.
CopyCtrl+CCopy selected text to the clipboard.
PasteCtrl+VPaste text from the clipboard.

Select AllCtrl+ASelect all text in the active editor.

DeleteDelDelete the selected text or control (in the form designer).

Find...Ctrl+FOpen the Find/Replace dialog.
Find NextF3Find the next occurrence of the search text.
Replace...Ctrl+HOpen the Find/Replace dialog with replace enabled.

Run Menu

Menu ItemShortcutDescription
RunF5Compile and run the program. If paused at a breakpoint, resumes execution with debugging disabled (runs free).
DebugShift+F5Compile and run with the debugger active. Breakpoints are active but execution does not pause at the first statement. If paused, resumes to the next breakpoint.
Run Without RecompileCtrl+F5Re-run the last compiled module without recompiling.
StopEscStop the running program immediately.

Step IntoF8Execute one statement, stepping into SUB/FUNCTION calls. If idle, starts a debug session and breaks at the first statement.
Step OverShift+F8Execute one statement, stepping over SUB/FUNCTION calls.
Step OutCtrl+Shift+F8Run until the current SUB/FUNCTION returns.
Run to CursorCtrl+F8Run until execution reaches the line where the cursor is positioned.

Toggle BreakpointF9Toggle a breakpoint on the current editor line.

Clear OutputClear the Output window.

Save on RunCheckbox: when enabled, all modified files are saved automatically before compiling. Persisted in preferences.

View Menu

Menu ItemShortcutDescription
CodeF7Switch to Code view for the active file (or the file selected in the Project Explorer).
DesignerShift+F7Switch to Design view for the active form file.

ToolbarCheckbox: show or hide the toolbar. Persisted in preferences.
Status BarCheckbox: show or hide the status bar. Persisted in preferences.

Menu Editor...Ctrl+EOpen the Menu Editor dialog for the active form. Allows designing menu bars with captions, names, levels, checked state, and enabled state.

Window Menu

Menu ItemDescription
Code EditorShow or raise the Code Editor window.
OutputShow or raise the Output window.
ImmediateShow or raise the Immediate window.
LocalsShow or raise the Locals debug window.
Call StackShow or raise the Call Stack debug window.
WatchShow or raise the Watch debug window.
BreakpointsShow or raise the Breakpoints window.

Project ExplorerShow or raise the Project Explorer window.
ToolboxShow or raise the Toolbox window.
PropertiesShow or raise the Properties panel.

Tools Menu

Menu ItemDescription
Preferences...Open the Preferences dialog (editor settings and project defaults).

Debug LayoutCheckbox: toggle a debug overlay that shows widget layout boundaries. Useful for diagnosing widget layout issues.

Help Menu

Menu ItemDescription
About DVX BASIC...Show the About dialog with version and copyright information.

3. Toolbar

The toolbar is organized into four groups separated by vertical dividers. Each button has a tooltip showing its name and keyboard shortcut.

File Group

ButtonShortcutAction
OpenCtrl+OAdd a file to the project (same as File > Add File).
SaveCtrl+SSave the active file.

Run Group

ButtonShortcutAction
RunF5Compile and run the program.
StopEscStop the running program.

Debug Group

ButtonShortcutAction
DebugShift+F5Start or resume a debug session.
Step IntoF8Step into the next statement.
Step OverShift+F8Step over the next statement.
Step OutCtrl+Shift+F8Step out of the current procedure.
Run to CursorCtrl+F8Run to the cursor position.

View Group

ButtonShortcutAction
CodeF7Switch to Code view.
DesignShift+F7Switch to Design view.

4. Code Editor

The Code Editor is the primary editing window for BASIC source code. It occupies the center of the screen, below the toolbar and above the Output and Immediate windows.

Object and Function Dropdowns

At the top of the Code Editor are two dropdown lists:

The editor shows one procedure at a time. Each procedure has its own buffer, and switching between them is instantaneous. The (General) section contains module-level declarations and code.

Syntax Highlighting

The editor applies real-time syntax coloring as you type. The following categories are highlighted in distinct colors:

CategoryExamples
KeywordsIF, THEN, FOR, NEXT, SUB, FUNCTION, DIM, PRINT, SELECT, CASE, DO, LOOP, WHILE, WEND, END, EXIT, CALL, GOSUB, GOTO, RETURN, DECLARE, CONST, TYPE, AND, OR, NOT, XOR, MOD, etc.
Type namesINTEGER, LONG, SINGLE, DOUBLE, STRING, BOOLEAN, BYTE, TRUE, FALSE
String literals"Hello, World!"
Comments' This is a comment, REM This is a comment
Numbers42, 3.14
Operators=, <, >, +, -, *, /, \, &

Editor Features

5. Form Designer

The Form Designer provides a visual design surface for editing .frm files. Switch to it with Shift+F7 or the Design toolbar button. It opens in a separate window showing a WYSIWYG preview of the form.

Design Surface

Form Properties

Forms have the following design-time properties: Name, Caption, Width, Height, Left, Top, Layout (VBox or HBox), Centered, AutoSize, and Resizable.

6. Project System

Project Files (.dbp)

A DVX BASIC project is stored as a .dbp file (DVX BASIC Project). The project file records:

Source Map

When the project is compiled, all files are concatenated into a single source stream. A source map tracks which lines belong to which file, enabling accurate error reporting and debugger navigation across multiple files. For .frm files, an injected BEGINFORM directive is prepended to the code section.

Project Operations

OperationDescription
New ProjectCreates a blank project with a name and directory. A default .frm file is added automatically.
Open ProjectOpens a .dbp file and loads all referenced files into memory.
Save ProjectWrites the .dbp file to disk.
Close ProjectCloses the project, prompting to save unsaved changes.
Add FileAdds a .bas or .frm file to the project. Opening a file without a project auto-creates an implicit project.
Remove FileRemoves a file from the project (prompts to save if modified).
Project PropertiesOpens a dialog for editing project metadata (name, author, company, version, copyright, description, icon, startup form).

Project Explorer

The Project Explorer is a tree view window listing all project files. Double-click a file to open it: .bas files open in Code view, .frm files open in Design view. The selected file in the Project Explorer determines the target for View > Code and View > Designer commands.

7. Properties Panel

The Properties panel (Window > Properties) has two sections:

Each control type exposes different properties (e.g., Caption, Text, Width, Height, MaxWidth, MaxHeight, Weight, Alignment, Enabled, Visible, and type-specific properties like DataSource and DataField for data-bound controls).

8. Toolbox

The Toolbox (Window > Toolbox) is a floating palette of buttons, one for each available control type. Controls are loaded dynamically from the widget plugin registry -- any widget DXE that provides a basName appears in the toolbox.

Click a tool to select it (the active tool name is stored in the designer state), then click on the form to place a new instance. Click the same tool again to deselect it and return to pointer mode.

Available Controls

VB NameDescription
CommandButtonPush button that triggers a Click event.
LabelStatic text label.
TextBoxSingle-line text input field.
TextAreaMulti-line text editor.
CheckBoxOn/off checkbox.
OptionButtonRadio button (mutually exclusive within a group).
ListBoxScrollable list of items.
ComboBoxDrop-down combo box.
DropDownSimple drop-down list.
PictureBoxCanvas for drawing and images.
ImageStatic image display.
ImageButtonClickable image button.
FrameGrouping container with a labeled border.
VBoxVertical layout container.
HBoxHorizontal layout container.
WrapBoxFlow layout container that wraps items to the next row.
SplitterResizable split between two child panes.
ScrollPaneScrollable container for large content.
TabStripTabbed container with multiple pages.
ListViewMulti-column list with headers.
TreeViewHierarchical tree control.
ProgressBarProgress indicator bar.
HScrollBarHorizontal slider/scrollbar.
SpinButtonNumeric up/down spinner.
LineHorizontal or vertical separator line.
SpacerInvisible spacing element for layout.
TimerNon-visual timer that fires periodic events.
ToolbarToolbar container for buttons.
StatusBarStatus bar at the bottom of a form.
TerminalANSI terminal emulator control.
DataData control for binding to a database.
DBGridData-bound grid for displaying database query results.

9. Debugger

The DVX BASIC IDE includes a full interactive debugger. The debugger operates as a state machine with three states:

StateDescription
DBG_IDLENo program loaded or running.
DBG_RUNNINGProgram is executing (VM running in slices).
DBG_PAUSEDExecution is paused at a breakpoint or step point. The IDE GUI is fully interactive.

Starting a Debug Session

Breakpoints

Setting Breakpoints

Breakpoint Validation

Not every line can have a breakpoint. The IDE validates the line content and silently refuses to set breakpoints on:

Breakpoint Storage

Each breakpoint records the project file index, the code line number within the file, the procedure index, and the procedure name (as Object.Event). When the project is compiled, breakpoints are converted to concatenated source line numbers that match the VM's OP_LINE opcodes.

Visual Indicators

Breakpoint Adjustment on Edit

When lines are added or removed in the editor, breakpoints below the edit point are automatically shifted to stay on the correct line.

Stepping

ActionShortcutBehavior
Step IntoF8Execute one statement. If the statement is a SUB/FUNCTION call, step into it.
Step OverShift+F8Execute one statement. If the statement is a SUB/FUNCTION call, execute the entire call and break at the next line in the current scope.
Step OutCtrl+Shift+F8Run until the current SUB/FUNCTION returns to its caller.
Run to CursorCtrl+F8Run until execution reaches the line under the cursor.

The Debug Run Loop

When a program is running in debug mode, the IDE enters a cooperative loop:

  1. The VM executes up to 10,000 steps per slice.
  2. If the VM hits a breakpoint (BAS_VM_BREAKPOINT), the state transitions to DBG_PAUSED. The IDE navigates the code editor to the breakpoint line, highlights it in yellow, auto-opens the Locals and Call Stack windows, and updates all debug windows.
  3. While paused, the IDE pumps dvxUpdate() continuously, keeping the GUI responsive. The user can inspect variables, modify them in the Immediate window, step, continue, or stop.
  4. When the user resumes (F5/Shift+F5/F8/etc.), the state transitions back to DBG_RUNNING and the loop continues.

Stopping

Press Esc or click the Stop toolbar button at any time to halt execution. The VM is destroyed, debug state resets to DBG_IDLE, and the IDE restores the designer windows that were hidden at run start.

10. Debug Windows

When the debugger pauses, the Locals and Call Stack windows are auto-opened (if not already visible). The Watch and Breakpoints windows can be opened manually from the Window menu.

Locals Window

Shows variables for the current execution scope. Displayed as a three-column ListView:

ColumnContent
NameVariable name (internal mangled names like static variable placeholders are filtered out).
TypeData type: Integer, Long, Single, Double, String, Boolean, Array, UDT. Array types show the element type (e.g., Integer()).
ValueCurrent value. Strings are shown in quotes. Booleans as True/False. Arrays show bounds and element count (e.g., Integer(0 To 9) [10]). Uninitialized arrays show (uninitialized).

The Locals window displays:

Up to 64 variables are displayed. The window is resizable.

Call Stack Window

Shows the current call chain as a two-column ListView:

ColumnContent
ProcedureProcedure name (or (module) for module-level code).
LineLine number where execution is paused (shown for the topmost frame).

The current location is shown first, followed by each caller in the call stack (walking from the deepest frame back to the module entry point). Up to 32 frames are displayed.

Watch Window

Allows monitoring arbitrary expressions while debugging. The window has a text input at the top and a two-column ListView below:

ColumnContent
ExpressionThe watch expression text.
ValueEvaluated result (or <error> if evaluation fails). Blank when not paused.

Adding Watch Expressions

Type an expression in the text input and press Enter. Up to 16 watch expressions can be active at once.

Watch Expression Syntax

Watch expressions support:

Editing and Deleting

Breakpoints Window

Lists all set breakpoints as a three-column ListView:

ColumnContent
FileProject file path.
ProcedureProcedure name (Object.Event format, or (General)).
LineCode line number within the file.

11. Immediate Window

The Immediate window is an interactive REPL at the bottom-right of the screen. Type a line of BASIC and press Enter to evaluate it. Results appear inline below your input.

Expression Evaluation

If the input is not a recognized statement keyword, it is automatically wrapped in a PRINT statement. For example, typing 2 + 2 evaluates as PRINT 2 + 2 and displays 4.

You can also type full statements:

Parse or runtime errors are displayed inline with an Error: prefix.

Inspecting Variables While Paused

When the debugger is paused at a breakpoint, the Immediate window has access to the running VM's state. Global variable values are copied into the evaluation VM, so expressions like count or name$ & " test" display live values.

Assigning Variables While Paused

When paused, you can modify variables in the running program directly from the Immediate window using assignment syntax:

variableName = newValue

The optional LET keyword is also accepted:

LET variableName = newValue

Assignment works for:

The new value is written directly into the VM's live variable slot (local, global, or form scope). A confirmation message is displayed, and the Locals and Watch windows update automatically to reflect the change.

If the assignment target cannot be resolved (unknown variable, out-of-bounds index, wrong type), an error message is displayed.

12. Output Window

The Output window is a read-only TextArea at the bottom-left of the screen. It displays:

The output buffer holds up to 32,768 characters. Use Run > Clear Output to clear it.

INPUT statements prompt the user via a modal InputBox dialog; the prompt text is also echoed to the Output window.

13. Find / Replace

Open with Ctrl+F (Find) or Ctrl+H (Replace). The Find/Replace dialog is modeless -- it stays open while you continue editing.

Dialog Controls

ControlDescription
Find inputThe text to search for.
Replace checkbox + inputEnable replacement mode and enter replacement text.
ScopeRadio group: Function, Object, File, or Project. Default is Project.
DirectionRadio group: Forward or Backward.
Match CaseCheckbox: case-sensitive search.

Buttons

ButtonAction
Find NextFind the next occurrence. Wraps across procedures, files, and the entire project depending on the scope setting.
ReplaceReplace the current match and find the next one.
Replace AllReplace all occurrences within the selected scope.
CloseClose the dialog.

Keyboard Shortcut

F3 repeats the last search (Find Next) without opening the dialog.

14. Preferences

Open via Tools > Preferences. Settings are saved to dvxbasic.ini in the app's config directory.

Editor Section

SettingDescriptionDefault
Skip comments/strings when renamingWhen renaming a control or form, skip occurrences inside comments and string literals.On
Require variable declaration (OPTION EXPLICIT)When enabled, variables must be declared with DIM before use.Off
Tab widthNumber of spaces per tab stop (1-8).3
Insert spaces instead of tabsWhen enabled, pressing Tab inserts spaces. When disabled, inserts a real tab character.On

New Project Defaults Section

These fields set the default values for new project metadata:

FieldDescriptionDefault
AuthorDefault author name.(empty)
CompanyDefault company name.(empty)
VersionDefault version string.1.0
CopyrightDefault copyright notice.(empty)
DescriptionDefault project description (multi-line).(empty)

Keyboard Shortcut Summary

ShortcutAction
Ctrl+OAdd File
Ctrl+SSave File
Ctrl+ASelect All
Ctrl+XCut
Ctrl+CCopy
Ctrl+VPaste
Ctrl+FFind
Ctrl+HReplace
Ctrl+EMenu Editor
F3Find Next
F5Run
Shift+F5Debug
Ctrl+F5Run Without Recompile
EscStop
F7Code View
Shift+F7Design View
F8Step Into
Shift+F8Step Over
Ctrl+Shift+F8Step Out
Ctrl+F8Run to Cursor
F9Toggle Breakpoint
DelDelete

DVX BASIC 1.0 -- Copyright 2026 Scott Duensing