Insane deep dive bug hunting.
This commit is contained in:
parent
a2a28d97d7
commit
f423621aa3
344 changed files with 1508694 additions and 554963 deletions
10
Makefile
10
Makefile
|
|
@ -180,10 +180,12 @@ test-fuzz:
|
|||
proxy:
|
||||
$(MAKE) -C src/tools/proxy
|
||||
|
||||
# The user's guide (src/manual; not shipped with DVX):
|
||||
# docs/manual/dvxManual.html (with images/) for browsing online and
|
||||
# docs/manual/dvxManual.pdf for printing. Needs asciidoctor,
|
||||
# asciidoctor-pdf, python3, and ImageMagick, so it is not part of all.
|
||||
# The user's guide (src/manual; not shipped with DVX), in docs/manual:
|
||||
# dvxManual.html (one self-contained file) for browsing,
|
||||
# dvxManual.pdf for reading on screen, and dvxManualInterior.pdf and
|
||||
# dvxManualCover.pdf for printing the book through Lulu. Needs
|
||||
# asciidoctor, asciidoctor-pdf, ruby, python3, a C compiler, and
|
||||
# ImageMagick, so it is not part of all.
|
||||
manual:
|
||||
src/manual/mkManual.sh
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ the shipped list.
|
|||
| `wpaper/swoop.jpg` | `bin/shared/wpaper/swoop.jpg` | Wallpaper image |
|
||||
| `wpaper/triangle.jpg` | `bin/shared/wpaper/triangle.jpg` | Wallpaper image |
|
||||
| `banks/DMXOPL.OP2` | `bin/shared/banks/DMXOPL.OP2` | DMXOPL 1.11, a General MIDI instrument bank for FM music by ConSiGno (MIT): https://github.com/sneakernets/DMXOPL, branch master, commit 63bd4821c6adaff29074f1f6486261961c2014b4 (2017-08-22, "V1.11 Release"), GENMIDI.op2 unchanged (SHA-256 d3feb807e5102d7de3075c2351cced7e853ba2da8708eff98cc1c8ef8f240ce2) |
|
||||
| `banks/DMXOPL.TXT` | `bin/shared/banks/DMXOPL.TXT` | Its licence and credits |
|
||||
| `banks/DMXOPL.TXT` | `bin/shared/banks/DMXOPL.TXT` | Its license and credits |
|
||||
| `banks/DMXOPL3.OP2` | `bin/shared/banks/DMXOPL3.OP2` | DMXOPL3, its OPL3 successor, by Sneakernets (MIT): the same repository, branch DMXOPL3, commit e83c144a2e6d3c283e20f9d16d011126931892f5 (2018-07-13, after the v2.11d release), GENMIDI.op2 unchanged (SHA-256 92fc03c7734c45b1ece2bfad1f79d1abbd2b27ec6b45fbfb1c5a74f5ce0138c9); DVX plays its OPL3-only waveforms as the OPL2's four, as for every bank |
|
||||
| `banks/DMXOPL3.TXT` | `bin/shared/banks/DMXOPL3.TXT` | Its licence and credits ("DMXOPL3 by Sneakernets", as the author asks) |
|
||||
| `banks/DMXOPL3.TXT` | `bin/shared/banks/DMXOPL3.TXT` | Its license and credits ("DMXOPL3 by Sneakernets", as the author asks) |
|
||||
| `keys/*.KEY` | `bin/system/KEYS/*.KEY` | DVX's repository key: packages it signs (DVX's own, and everything the package server publishes) are trusted as DVX's |
|
||||
|
||||
The desktop sounds (`bin/shared/sounds/`) are made by mksounds and the
|
||||
|
|
@ -46,7 +46,7 @@ Comments start with `;`. The shell loads the user's copy at startup via
|
|||
|-----|---------|-------------|
|
||||
| `width` | 640 | Requested horizontal resolution |
|
||||
| `height` | 480 | Requested vertical resolution |
|
||||
| `bpp` | 16 | Preferred color depth (8, 15, 16, 32; 24-bit modes are never used) |
|
||||
| `bpp` | 16 | Preferred color depth (8, 15, 16, or 32; 24-bit modes are never used) |
|
||||
|
||||
These are the built-in defaults for a missing key; the shipped file sets
|
||||
1024 x 768, and Setup writes the mode it ran in. DVX takes one of the
|
||||
|
|
@ -124,7 +124,7 @@ Control Panel's Network page edits it.
|
|||
| `netmask` | (none) | dotted IPv4 | Static subnet mask (dhcp = false) |
|
||||
| `gateway` | (none) | dotted IPv4 | Static default gateway (optional) |
|
||||
| `dns1`, `dns2` | (none) | dotted IPv4 | Name servers; they win over the DHCP server's (with dhcp = false and both empty, names cannot be looked up) |
|
||||
| `hostname` | DVX | 1-63 letters, digits, hyphens | Name sent to the DHCP server and returned by gethostname() |
|
||||
| `hostname` | DVX | 1-63 letters, digits, and hyphens | Name sent to the DHCP server and returned by gethostname() |
|
||||
| `vector` | auto | auto, 0x60-0x80 | Packet driver interrupt (hex as 0x60; plain digits are decimal, so 96 is 0x60). The Network page shows any other number as one that cannot be used, and OK refuses it |
|
||||
|
||||
### [printer] Section
|
||||
|
|
@ -134,7 +134,7 @@ Panel's Printer page edits the port, file, model, baud, and handshake,
|
|||
File > Page Setup (and the Printer page's Page Setup button) the rest.
|
||||
A page setup that cannot work (margins leaving no room, values out of
|
||||
range) is ignored as a whole, wrap, header, and footer included, in
|
||||
favour of the defaults.
|
||||
favor of the defaults.
|
||||
|
||||
| Key | Default | Values | Description |
|
||||
|-----|---------|--------|-------------|
|
||||
|
|
@ -149,7 +149,7 @@ favour of the defaults.
|
|||
| `marginLeft`, `marginRight` | 5 | characters | Left and right margins |
|
||||
| `tabWidth` | 8 | 1-16 | Tab stops for printed text |
|
||||
| `wrap` | true | true, false | Wrap long lines at a word, or cut them off |
|
||||
| `header`, `footer` | &f, Page &p | text | &f file name, &p page, &n pages, &d date, &t time, &l &c &r left / centre / right, && an ampersand |
|
||||
| `header`, `footer` | &f, Page &p | text | &f file name, &p page, &n pages, &d date, &t time, &l &c &r left / center / right, and && an ampersand |
|
||||
|
||||
|
||||
## Theme Files (.thm)
|
||||
|
|
@ -163,9 +163,9 @@ Bundled themes:
|
|||
| File | Description |
|
||||
|------|-------------|
|
||||
| `cde.thm` | CDE (Common Desktop Environment) -- warm tan/blue palette |
|
||||
| `geos.thm` | GEOS Ensemble -- cyan/grey palette |
|
||||
| `geos.thm` | GEOS Ensemble -- cyan/gray palette |
|
||||
| `hotdog.thm` | Hot Dog Stand -- the infamous yellow/red/black palette |
|
||||
| `win31.thm` | Windows 3.1 -- grey/navy palette |
|
||||
| `win31.thm` | Windows 3.1 -- gray/navy palette |
|
||||
|
||||
|
||||
## Dependency Files (.dep)
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ acceleration = medium
|
|||
speed = 8
|
||||
|
||||
; Shell settings.
|
||||
; desktop: path to the desktop app loaded at startup
|
||||
; welcome: program started after the desktop (the Welcome window shown at
|
||||
; the first start); it removes this line itself when you tick
|
||||
; desktop: path to the shell program loaded at startup (Program Manager)
|
||||
; welcome: program started after the shell program (the Welcome window shown at
|
||||
; the first start); it removes this line itself when you check
|
||||
; "Don't show this again"
|
||||
|
||||
[shell]
|
||||
|
|
@ -102,7 +102,7 @@ password =
|
|||
; columns: characters across the page; margins in lines (top, bottom)
|
||||
; and characters (left, right)
|
||||
; header, footer: &f file name, &p page, &n pages, &d date, &t time,
|
||||
; &l &c &r left / centre / right, && an ampersand
|
||||
; &l &c &r left / center / right, && an ampersand
|
||||
; A page setup that cannot work (linesPerPage to footer: a value out of
|
||||
; range, or margins that leave no room) is ignored as a whole, and the
|
||||
; defaults are used.
|
||||
|
|
|
|||
|
|
@ -708,6 +708,7 @@ img { max-width: 100%; }
|
|||
<li><a href="#ide.properties">Index row</a></li>
|
||||
<li><a href="#lang.ini">INI</a></li>
|
||||
<li><a href="#lang.ini">IniRead</a></li>
|
||||
<li><a href="#ctrl.form">Initialize (form)</a></li>
|
||||
<li><a href="#lang.ini">IniWrite</a></li>
|
||||
<li><a href="#lang.screen">INKEY$</a></li>
|
||||
<li><a href="#lang.io">INPUT</a></li>
|
||||
|
|
@ -841,7 +842,10 @@ img { max-width: 100%; }
|
|||
<li><a href="#lang.runtime">MidiPortInfo$</a></li>
|
||||
<li><a href="#lang.runtime">MidiPut</a></li>
|
||||
<li><a href="#lang.runtime">MidiRecordNew</a></li>
|
||||
<li><a href="#lang.runtime">MidiRecordPause</a></li>
|
||||
<li><a href="#lang.runtime">MidiRecordResume</a></li>
|
||||
<li><a href="#lang.runtime">MidiRecordSave</a></li>
|
||||
<li><a href="#lang.runtime">MidiRecordTime</a></li>
|
||||
<li><a href="#ide.changes">Migration</a></li>
|
||||
<li><a href="#ctrl.hscrollbar">Min</a></li>
|
||||
<li><a href="#lang.func.date">MINUTE</a></li>
|
||||
|
|
@ -1075,6 +1079,7 @@ img { max-width: 100%; }
|
|||
<li><a href="#lang.declarations">PUBLIC</a></li>
|
||||
<li><a href="#lang.fileio">PUT</a></li>
|
||||
<li><a href="#lang.func.math">QBCOLOR</a></li>
|
||||
<li><a href="#ctrl.form">QueryUnload</a></li>
|
||||
<li><a href="#ctrl.optionbutton">Radio Button</a></li>
|
||||
<li><a href="#lang.events">RaiseEvent</a></li>
|
||||
<li><a href="#lang.events">RAISEEVENT</a></li>
|
||||
|
|
@ -1084,7 +1089,10 @@ img { max-width: 100%; }
|
|||
<li><a href="#lang.io">READ</a></li>
|
||||
<li><a href="#ctrl.spinbutton">RealMode</a></li>
|
||||
<li><a href="#ctrl.menus">Recent files menu</a></li>
|
||||
<li><a href="#lang.runtime">RecordCancel</a></li>
|
||||
<li><a href="#lang.runtime">Recording</a></li>
|
||||
<li><a href="#lang.runtime">RecordPause</a></li>
|
||||
<li><a href="#lang.runtime">RecordResume</a></li>
|
||||
<li><a href="#ctrl.data">RecordSource</a></li>
|
||||
<li><a href="#lang.runtime">RecordStart</a></li>
|
||||
<li><a href="#lang.runtime">RecordStop</a></li>
|
||||
|
|
@ -1410,6 +1418,7 @@ img { max-width: 100%; }
|
|||
<li><a href="#lang.runtime">TcpSendSome</a></li>
|
||||
<li><a href="#lang.runtime">Telnet</a></li>
|
||||
<li><a href="#ctrl.terminal">Terminal</a></li>
|
||||
<li><a href="#ctrl.form">Terminate (form)</a></li>
|
||||
<li><a href="#ctrl.textbox">Text</a></li>
|
||||
<li><a href="#lang.runtime">Text smoothing</a></li>
|
||||
<li><a href="#ctrl.textarea">TextArea</a></li>
|
||||
|
|
@ -1446,6 +1455,7 @@ img { max-width: 100%; }
|
|||
<li><a href="#lang.runtime">UdpSend</a></li>
|
||||
<li><a href="#lang.forms">UNLOAD</a></li>
|
||||
<li><a href="#ctrl.form">Unload</a></li>
|
||||
<li><a href="#ctrl.form">UnloadMode</a></li>
|
||||
<li><a href="#lang.loops">UNTIL</a></li>
|
||||
<li><a href="#ctrl.image">UseMaskColor</a></li>
|
||||
<li><a href="#lang.runtime">User Folder</a></li>
|
||||
|
|
@ -1472,6 +1482,8 @@ img { max-width: 100%; }
|
|||
<li><a href="#lang.constants">vbAlignRight</a></li>
|
||||
<li><a href="#lang.constants">vbAlignTop</a></li>
|
||||
<li><a href="#ctrl.picturebox">vbAlignTop</a></li>
|
||||
<li><a href="#lang.constants">vbAppTaskManager</a></li>
|
||||
<li><a href="#lang.constants">vbAppWindows</a></li>
|
||||
<li><a href="#lang.constants">vbArchive</a></li>
|
||||
<li><a href="#lang.constants">vbArray</a></li>
|
||||
<li><a href="#ctrl.common.props">vbArrow</a></li>
|
||||
|
|
@ -1517,6 +1529,10 @@ img { max-width: 100%; }
|
|||
<li><a href="#lang.constants">vbFirstFourDays</a></li>
|
||||
<li><a href="#lang.constants">vbFirstFullWeek</a></li>
|
||||
<li><a href="#lang.constants">vbFirstJan1</a></li>
|
||||
<li><a href="#lang.constants">vbFormCode</a></li>
|
||||
<li><a href="#lang.constants">vbFormControlMenu</a></li>
|
||||
<li><a href="#lang.constants">vbFormMDIForm</a></li>
|
||||
<li><a href="#lang.constants">vbFormOwner</a></li>
|
||||
<li><a href="#lang.constants">vbFriday</a></li>
|
||||
<li><a href="#lang.constants">vbFSSolid</a></li>
|
||||
<li><a href="#lang.constants">vbFSTransparent</a></li>
|
||||
|
|
@ -1895,7 +1911,7 @@ img { max-width: 100%; }
|
|||
<li>Object -- lists (General) plus all objects (form name, control names, menu item names, and the WithEvents variables the file declares). Selecting an object filters the Function dropdown.</li>
|
||||
<li>Function -- lists all event handlers (procedures) for the selected object. Implemented handlers are listed first (plain text); unimplemented handlers follow in brackets (e.g., [Click]). Selecting an unimplemented event creates a new event handler stub. Only the events the object can get are listed: Paint, for example, appears for the form and for PictureBoxes, the objects a program draws on.</li>
|
||||
</ul>
|
||||
<p>A WithEvents variable (Dim WithEvents acct As Account, also Private or Public, in a module, a form, or a class module) is listed as an object; its events are the ones its class module declares with Event -- or, for one declared As a control type (As TextBox) or As a form (As Form2, As Form), the control's or the form's events. Picking one of them creates the handler acct_EventName with the event's own parameters, so it matches what the object raises. Selecting the variable when it has no handler yet creates the handler for the first event, as a control's default event is created.</p>
|
||||
<p>A WithEvents variable (Dim WithEvents acct As Account, also Private or Public, in a module, a form, or a class module) is listed as an object; its events are the ones its class module declares with Event -- or, for one declared As a control type (As TextBox) or As a form (As Form2, As Form), the control's or the form's events. Picking one of them creates the handler acct_EventName with the event's own parameters, so it matches what the object raises. Selecting the variable when it has no handler yet creates the handler for the class's first event, or for the default event of the control type or form (Change for a TextBox, Load for a form), as a control's default event is created.</p>
|
||||
<p>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.</p>
|
||||
<p>Text outside the procedure being shown is never lost: lines typed above or below the SUB move to (General), a second SUB typed into the buffer becomes a procedure of its own, and a procedure whose SUB line was deleted becomes (General) text. When you leave an event handler that was generated and never edited it is removed; empty SUBs and FUNCTIONs you wrote yourself are kept. After a save the editor shows exactly what was stored (blank lines around a procedure are normalized). A section too large for the editor opens read-only, with a message in the status bar.</p>
|
||||
<h2>Syntax Highlighting</h2>
|
||||
|
|
@ -1933,7 +1949,7 @@ img { max-width: 100%; }
|
|||
<li>Menu bar preview -- if the form has menu items (defined via the Menu Editor), a preview menu bar is rendered on the design window.</li>
|
||||
<li>Delete key -- removes the selected control and everything inside it.</li>
|
||||
</ul>
|
||||
<p>Opening a form in the designer does not mark it modified. A control whose Visible property is False is still shown on the design surface (the setting applies when the program runs). Disabling a container greys the controls inside it; a control's own Enabled = False is kept when the container is enabled again. A .frm file without an AutoSize line opens without AutoSize; AutoSize = True wins over Width and Height lines. Text values (Caption, Text, and so on) are limited to 379 characters.</p>
|
||||
<p>Opening a form in the designer does not mark it modified. A control whose Visible property is False is still shown on the design surface (the setting applies when the program runs). Disabling a container grays the controls inside it; a control's own Enabled = False is kept when the container is enabled again. A .frm file without an AutoSize line opens without AutoSize; AutoSize = True wins over Width and Height lines. Text values (Caption, Text, and so on) are limited to 379 characters.</p>
|
||||
<h2>Menu Editor</h2>
|
||||
<p>The Menu Editor (View > Menu Editor, Ctrl+E) edits the active form's menu bar and popup menus. Menus nest at most 15 levels (0-14); indenting refuses when any item below would go deeper. OK rejects an item nested more than one level below the item above it, and a blank item that has sub-items (it must be named); blank items without sub-items are dropped. The window's close box cancels. Shortcut is a key that runs the item (F2, Ctrl+X, Alt+Enter ...), shown at its right; Text is key text shown without making a shortcut (see Menu Item Properties); OK rejects a Shortcut it does not know. Index makes the item an element of a menu control array: give the items of the array the same Name and each its own Index (0 to 32767), next to each other in one menu, as in Visual Basic's Menu Editor; OK rejects one without an Index, an Index used twice, elements apart, and an Index on a menu of the menu bar or a popup menu. Visible unticked hides an item until the program sets its Visible to True (a recent-files list's separator); on a top-level menu, Popup makes it a popup menu instead. Renaming a menu item renames its event handlers in the code and updates the ContextMenu setting of the form and its controls; inserting, deleting, and moving items does not rename anything. Enter clicks OK (unless a button has the focus) and Esc Cancel, as in a dialog box.</p>
|
||||
<h2>Form Properties</h2>
|
||||
|
|
@ -1972,7 +1988,7 @@ File0 = form1.frm
|
|||
Count = 1</code></pre>
|
||||
<h2>Fonts a Program Carries</h2>
|
||||
<p>A program can carry fonts of its own, so its text looks the same whatever fonts were installed. In Project > Properties, Add... in the Fonts row picks a .DFN font (one outside the project's directory can be copied into it); Remove takes the chosen one off the list (the file stays). The fonts are listed in the [Fonts] section of the project file. Make builds them into the program as font resources, and the program has them whenever it runs; running it from the IDE gives it the same fonts until it stops. A program carries at most 64 fonts.</p>
|
||||
<p>A program's fonts are its own: other programs never see them. Where a font it carries is of a family that is installed too, its sizes and styles come first and the installed family fills in the rest. Fonts are made with the SDK's mkfont from TrueType, Type 1, and bitmap fonts -- one size and only the characters the program uses keeps a font small -- or copied from DVX's FONTS folder. Each .DFN carries the notice and licence of the font it was made from.</p>
|
||||
<p>A program's fonts are its own: other programs never see them. Where a font it carries is of a family that is installed too, its sizes and styles come first and the installed family fills in the rest. Fonts are made with the SDK's mkfont from TrueType, Type 1, and bitmap fonts -- one size and only the characters the program uses keeps a font small -- or copied from DVX's FONTS folder. Each .DFN carries the notice and license of the font it was made from.</p>
|
||||
<h2>How Projects are Compiled</h2>
|
||||
<p>When the project is compiled, all source files are concatenated into a single source stream: the modules first, then the class modules, then the UserControls, then the forms. The IDE tracks which lines belong to which file so error messages and debugger locations point to the correct .bas, .cls, or .frm file. The code section of each .frm file is preceded by a hidden BEGINFORM marker that ties its code to its form, and the code of each class module and UserControl is likewise marked with its class name; the header lines of a class module or UserControl are not compiled.</p>
|
||||
<h2>Compile-Time Validation</h2>
|
||||
|
|
@ -2404,7 +2420,7 @@ End Sub</code></pre>
|
|||
</div>
|
||||
<div class="topic" id="ide.changes">
|
||||
<h1>Changes in This Release</h1>
|
||||
<p>This release fixes a large number of problems in the language, the runtime, the controls, and the IDE. Most programs keep working unchanged. Six changes need attention in existing programs: variable scope (see Module Variables Need SHARED), a module's variables and Private procedures being its own (see A Module's Variables Are Its Own), the order of the bytes in a color, text stored in numbers, fractions given where a whole number is taken (see Colors and Numbers Follow Visual Basic), the spaces PRINT puts around numbers and the 0 it leaves out of a fraction (see PRINT, Text, and Lists Follow Visual Basic), and property values a control refuses and the numbers of a Label's Alignment (see Controls Refuse Bad Values).</p>
|
||||
<p>This release fixes a large number of problems in the language, the runtime, the controls, and the IDE. Most programs keep working unchanged. Seven changes need attention in existing programs: variable scope (see Module Variables Need SHARED), a module's variables and Private procedures being its own (see A Module's Variables Are Its Own), the order of the bytes in a color, text stored in numbers, fractions given where a whole number is taken (see Colors and Numbers Follow Visual Basic), the spaces PRINT puts around numbers and the 0 it leaves out of a fraction (see PRINT, Text, and Lists Follow Visual Basic), and property values a control refuses and the numbers of a Label's Alignment (see Controls Refuse Bad Values).</p>
|
||||
<h2>Module Variables Need SHARED</h2>
|
||||
<p>DVX BASIC now uses the QBasic scope rules. A SUB or FUNCTION sees a variable declared at module level (including the code section of a form) only when it is declared with DIM SHARED, or named in a SHARED statement inside the procedure. Before, every module variable was visible everywhere.</p>
|
||||
<ul>
|
||||
|
|
@ -2514,7 +2530,7 @@ End Sub</code></pre>
|
|||
</ul>
|
||||
<h2>Objects, Classes, and Variants</h2>
|
||||
<ul>
|
||||
<li>New: class modules (.cls files) define your own objects, with Public and Private member variables, Subs and Functions, Property Get / Let / Set, Class_Initialize and Class_Terminate, Me, and a default member. Objects are made with NEW (DIM x AS NEW Account, SET x = NEW Account), compared with Is and tested with TypeOf ... Is. An object is freed, and its Class_Terminate run, as soon as nothing refers to it any more.</li>
|
||||
<li>New: class modules (.cls files) define your own objects, with Public and Private member variables, Subs and Functions, Property Get / Let / Set, Class_Initialize and Class_Terminate, Me, and a default member. Objects are made with NEW (DIM x AS NEW Account, SET x = NEW Account), compared with Is, and tested with TypeOf ... Is. An object is freed, and its Class_Terminate run, as soon as nothing refers to it any more.</li>
|
||||
<li>New: the Collection object (Add, Remove, Item, Count, with optional text keys) and FOR EACH ... NEXT over Collections and arrays.</li>
|
||||
<li>New: the Variant type (DIM v AS VARIANT) with the special values Empty and Null, and the functions VARTYPE, TYPENAME, ISEMPTY, ISNULL, ISNUMERIC, ISOBJECT, ISARRAY, and CVAR, with the vb... VarType constants and vbObjectError.</li>
|
||||
<li>New: PUBLIC and PRIVATE at module level (PUBLIC x is DIM SHARED x that every file sees, PRIVATE x is DIM x), and GLOBAL, Visual Basic 3's PUBLIC.</li>
|
||||
|
|
@ -2580,7 +2596,11 @@ End Sub</code></pre>
|
|||
<li>Fixed: RESUME NEXT after an error in the last statement of a FOR EACH loop goes on with the next item (it ran the loop again for the same item, without end).</li>
|
||||
<li>Screen, Printer, Clipboard, and App are objects, as in Visual Basic: Set o = Screen, Set a = App, an argument for an Object parameter, TypeName(Printer), TypeName(App), and o Is Screen work, and their members are reached through the variable (a.Title). Their names are types too (Dim p As Printer, Sub Arrange(s As Screen), Dim a As App), which hold that object only. Screen alone is the object; QBasic's SCREEN function always has its arguments.</li>
|
||||
<li>New: WithEvents on a variable declared As a control type (Dim WithEvents t As TextBox) or As a form (Dim WithEvents f As Form2, or As Form), in a module, a form, or a class module: the control or form instance it holds sends its events to the variable's handlers (t_Change, f_Load, f_QueryUnload) after its own, and the code window's Event list shows them. A Cancel or KeyAscii one handler sets is what the next one gets. A control installed in DVX (a control file in WIDGETS) is a type a declaration may name (Dim iv As IconView) when a form of the program has one, or in the IDE, any one installed.</li>
|
||||
<li>Changed: a form's Unload event has Visual Basic's Cancel parameter (Sub Form1_Unload(Cancel As Integer)); Cancel = 1 keeps the form loaded. A handler without the parameter runs as before; one with it did not run at all.</li>
|
||||
<li>A handler name SetEvent gives, and a ControlName_EventName handler of a control or form a module's code made, means the procedure of the file whose code gave it first: two modules may each have a Private procedure of the name. Before, the first module's was found.</li>
|
||||
<li>Changed: a form's QueryUnload event has Visual Basic's UnloadMode parameter (Sub Form1_QueryUnload(Cancel As Integer, UnloadMode As Integer)), which says why the form closes: vbFormControlMenu (the user closed its window), vbFormCode (Unload in code), vbAppWindows (DVX is exiting), or vbAppTaskManager (another program asked it to close, or DVX ended its screen saver). A handler that takes Cancel alone runs as before. The code window makes a new QueryUnload handler with both parameters.</li>
|
||||
<li>New: a form's Initialize and Terminate events, as in Visual Basic: Form1_Initialize runs as a form instance is made (the first use of the form's name, New, or LoadFormText), before its Load; Form1_Terminate once the instance is gone (not loaded, and nothing refers to it any more), as soon as its last reference goes (Set f = Nothing, the end of the procedure whose variable held it), and for every instance left as the program ends normally. The code window's Event list has both.</li>
|
||||
<li>New: a form's code can declare events of its own (Public Event Name(args)) and raise them (RaiseEvent Name(args)), as a class module does; a variable declared WithEvents As that form (Dim WithEvents f As Form2) handles them (Sub f_Name), its arguments without ByVal going by reference to each handler in turn, and the code window's Event list for the variable shows them after the form's own events. Such an event may take any name but that of an event every form has (Load, Click, KeyPress, and the others), which does not compile (Ambiguous name), as in Visual Basic: Event Change and Event Timer are the form's own.</li>
|
||||
</ul>
|
||||
<p><a href="#lang.classes">See: Objects and Class Modules</a></p>
|
||||
<p><a href="#lang.events">See: Events</a></p>
|
||||
|
|
@ -2709,7 +2729,7 @@ End Sub</code></pre>
|
|||
<li>Changed: Printer.KillDoc stops printing at once, without waiting for a busy or offline printer or asking about it, as in Visual Basic.</li>
|
||||
<li>Changed: a control named alone in a form's code is always that form's own, and in a module's or a class's code (which Visual Basic cannot name a control in without its form) the control of the one loaded form that has one of that name; when several loaded forms have it, the name raises error 1001 (Ambiguous control name) -- write FormName.Control -- where the current form's or the first form's was used. A control named through a form (Form2.Text1, f.Text1 through As Object) is that form's only: another loaded form's of the name was used when the form had none, and through a variable holding Nothing error 91 is raised.</li>
|
||||
<li>Changed: ConnAttach, SerAttach, and CommAttach find the Terminal they are given by its name as a name written alone in the code that calls them is found: from a form's code, that form's Terminal; from a module's or a class's, the one loaded form's that has one, with error 1001 (Ambiguous control name) when several have one. They took the first loaded form's.</li>
|
||||
<li>New: the menus of the menu bar have Caption, Enabled, and Visible at run time, as in Visual Basic: mnuFile.Caption = "&Archivo" retitles the menu (Alt and its new letter open it), mnuEdit.Enabled = False greys it (it opens neither by the mouse nor by the keyboard), and mnuDebug.Visible = False takes it off the bar (the bar goes with the last one, and the form's inside grows). A top-level menu written Visible = False stays a popup menu PopupMenu and ContextMenu show, until code shows it on the bar. Menus next to each other on the bar can be a menu control array (Load mnuWin(2) adds a menu with no items, whose Click is its command). A submenu can be hidden (Visible = False) with its items. Before, a top-level menu's properties raised an error, and an Index on one stopped the form from loading.</li>
|
||||
<li>New: the menus of the menu bar have Caption, Enabled, and Visible at run time, as in Visual Basic: mnuFile.Caption = "&Archivo" retitles the menu (Alt and its new letter open it), mnuEdit.Enabled = False grays it (it opens neither by the mouse nor by the keyboard), and mnuDebug.Visible = False takes it off the bar (the bar goes with the last one, and the form's inside grows). A top-level menu written Visible = False stays a popup menu PopupMenu and ContextMenu show, until code shows it on the bar. Menus next to each other on the bar can be a menu control array (Load mnuWin(2) adds a menu with no items, whose Click is its command). A submenu can be hidden (Visible = False) with its items. Before, a top-level menu's properties raised an error, and an Index on one stopped the form from loading.</li>
|
||||
<li>New: a menu's Click runs as it is about to open, as in Visual Basic -- a menu of the menu bar, a submenu, a menu PopupMenu shows -- so its code can set its items first (mnuEdit_Click enabling Paste). It never ran before.</li>
|
||||
<li>Changed: PopupMenu takes Visual Basic's arguments, the menu (itself, or its name), flags (vbPopupMenuLeftAlign, vbPopupMenuCenterAlign, vbPopupMenuRightAlign; vbPopupMenuLeftButton and vbPopupMenuRightButton change nothing), x, and y; PopupMenu "mnuPop", 5, 7 now means flags 5 and x 7, so write PopupMenu "mnuPop", , 5, 7. RemoveMenu and DestroyMenu take a top-level menu of the form file (a popup menu one too).</li>
|
||||
<li>New: Load f loads the form a Form variable, an Object, or Me refers to, as in Visual Basic (Set f = New Form2: Load f runs the copy's Load without showing it); it did not compile. Load of an object that is no form raises error 361.</li>
|
||||
|
|
@ -3382,7 +3402,7 @@ Dim w As Form1
|
|||
Set w = New Form1 ' a second Form1 window
|
||||
w.Show</code></pre>
|
||||
<p>The value must be an object or Nothing; anything else raises error 424 (Object required). SET is not used for ordinary numeric or string assignment.</p>
|
||||
<p>SET FormName = ..., with the name of one of the program's forms, sets the variable that name is, as Visual Basic's predeclared form variable: SET Form1 = f makes Form1 mean the form f refers to from then on, which must be a Form1 (a copy NEW made, or the form the name let go; another form raises error 13), and SET Form1 = NEW Form1 gives the name a fresh copy. SET Form1 = Nothing lets go of the form the name held: a variable that still refers to it keeps it, with its form-level variables; one still loaded stays loaded, under no name; and once nothing refers to it and it is not loaded, its variables are freed. The name's next use then makes a new Form1, with its variables at their starting values, as in Visual Basic. A form's name takes a form only with SET: Form1 = x without SET does not compile ("'Form1' is a form: assign a form to it with SET").</p>
|
||||
<p>SET FormName = ..., with the name of one of the program's forms, sets the variable that name is, as Visual Basic's predeclared form variable: SET Form1 = f makes Form1 mean the form f refers to from then on, which must be a Form1 (a copy NEW made, or the form the name let go; another form raises error 13), and SET Form1 = NEW Form1 gives the name a fresh copy. SET Form1 = Nothing lets go of the form the name held: a variable that still refers to it keeps it, with its form-level variables; one still loaded stays loaded, under no name; and once nothing refers to it and it is not loaded, its Terminate event runs (Form1_Terminate) and its variables are freed. The name's next use then makes a new Form1, with its variables at their starting values, as in Visual Basic. A form's name takes a form only with SET: Form1 = x without SET does not compile ("'Form1' is a form: assign a form to it with SET").</p>
|
||||
<h2>ERASE</h2>
|
||||
<p>Frees the memory of a dynamic array (declared with DIM name() or with bounds that are not constant, or created by REDIM) and leaves it without bounds, as DIM name() declares one: its bounds and elements raise error 9 until a REDIM gives it new bounds. A fixed-size array (declared with constant bounds) keeps its bounds and has every element reset to zero, an empty string (n spaces for STRING * n), False, or a fresh TYPE instance. ERASE of an array parameter erases the caller's array as its kind says, as in Visual Basic: a fixed-size one is reset, a dynamic one freed.</p>
|
||||
<pre><code>ERASE arrayName
|
||||
|
|
@ -3625,7 +3645,7 @@ End Function
|
|||
Beep2 3 ' result discarded</code></pre>
|
||||
<p>name(...) in an expression calls a FUNCTION; using a SUB there is a compile error.</p>
|
||||
<h3>Labels, GOSUB, and Variables in Procedures</h3>
|
||||
<p>Labels belong to the SUB or FUNCTION they are written in (or to the module level). GOTO, GOSUB, ON ... GOTO/GOSUB and ON ERROR GOTO can only reach a label of the same procedure, and different procedures can reuse the same label name. GOSUB and RETURN work inside a procedure; see GOTO / GOSUB / RETURN. A procedure sees module variables only when they are SHARED; see Variable Scope and SHARED.</p>
|
||||
<p>Labels belong to the SUB or FUNCTION they are written in (or to the module level). GOTO, GOSUB, ON ... GOTO/GOSUB, and ON ERROR GOTO can only reach a label of the same procedure, and different procedures can reuse the same label name. GOSUB and RETURN work inside a procedure; see GOTO / GOSUB / RETURN. A procedure sees module variables only when they are SHARED; see Variable Scope and SHARED.</p>
|
||||
<h2>DEF FN</h2>
|
||||
<p>Defines a single-expression function. The function name begins with FN and is invoked just like a normal function. DEF FN functions cannot span multiple statements. A DEF FN must be defined before it is used, and only at module level (not inside a SUB or FUNCTION). Names in the expression other than the parameters are module variables of its file, SHARED or not; the parameters are always passed by value.</p>
|
||||
<pre><code>DEF FNname(params) = expression</code></pre>
|
||||
|
|
@ -3839,7 +3859,7 @@ ErrorHandler:
|
|||
52 Bad file number or file not open
|
||||
53 File not found (OPEN for INPUT, KILL, FILECOPY, FILELEN, ...: a file missing from a folder that exists)
|
||||
54 Bad file mode (also: a printer opened for anything but OUTPUT or APPEND; PRINT # or WRITE # to a file opened FOR INPUT; INPUT #, LINE INPUT #, or INPUT$ from a file opened FOR OUTPUT or APPEND)
|
||||
57 Device I/O error (printing failed or was cancelled; writing to an open file failed for a reason other than a full disk, such as a write-protected floppy or a CD-ROM refusing the write; a disk that cannot be read)
|
||||
57 Device I/O error (printing failed or was canceled; writing to an open file failed for a reason other than a full disk, such as a write-protected floppy or a CD-ROM refusing the write; a disk that cannot be read)
|
||||
58 File already exists (NAME to a name another file or folder has)
|
||||
59 Bad record length (OPEN ... LEN must be 1 to 32767; GET/PUT data longer than LEN)
|
||||
61 Disk full (PRINT #, WRITE #, PUT, or CLOSE could not write all of its output; see File Output Errors)
|
||||
|
|
@ -3981,20 +4001,20 @@ Loop Until quitting</code></pre>
|
|||
<p>These statements work as they do in QBasic. The first one a program uses gives it a screen of its own: a window, titled with the program's name, the size of the screen mode. From then on PRINT and INPUT use that screen too (before it, PRINT writes to the output window and INPUT asks in a dialog box, as always). Keys typed in the window go to INKEY$ and INPUT. The window stays open when the program's code has finished, so its output can be read; closing it ends the program.</p>
|
||||
<p>The names are not reserved: a program that has its own variable, SUB, or constant called Color, Cls, Draw, and so on keeps using it.</p>
|
||||
<h2>Screen Modes</h2>
|
||||
<pre> Mode Size and colours Text (WIDTH choices) Pages
|
||||
<pre> Mode Size and colors Text (WIDTH choices) Pages
|
||||
---- ---------------- -------------------- -----
|
||||
SCREEN 0 Text only, 16 colours 80 or 40 x 25, 43 or 50 8 (4 at 80 x 43, 80 x 50)
|
||||
SCREEN 1 320 x 200, 4 colours (two palettes) 40 x 25 1
|
||||
SCREEN 2 640 x 200, 2 colours 80 x 25 1
|
||||
SCREEN 7 320 x 200, 16 colours 40 x 25 8
|
||||
SCREEN 8 640 x 200, 16 colours 80 x 25 4
|
||||
SCREEN 9 640 x 350, 16 of 64 colours 80 x 25 or 80 x 43 2
|
||||
SCREEN 0 Text only, 16 colors 80 or 40 x 25, 43 or 50 8 (4 at 80 x 43, 80 x 50)
|
||||
SCREEN 1 320 x 200, 4 colors (two palettes) 40 x 25 1
|
||||
SCREEN 2 640 x 200, 2 colors 80 x 25 1
|
||||
SCREEN 7 320 x 200, 16 colors 40 x 25 8
|
||||
SCREEN 8 640 x 200, 16 colors 80 x 25 4
|
||||
SCREEN 9 640 x 350, 16 of 64 colors 80 x 25 or 80 x 43 2
|
||||
SCREEN 10 640 x 350, 4 shades (some blinking) 80 x 25 or 80 x 43 2
|
||||
SCREEN 11 640 x 480, 2 colours 80 x 30 or 80 x 60 1
|
||||
SCREEN 12 640 x 480, 16 colours 80 x 30 or 80 x 60 1
|
||||
SCREEN 13 320 x 200, 256 colours 40 x 25 1</pre>
|
||||
<p>A program starts in SCREEN 0. SCREEN with a new mode (and WIDTH) clears the screen and restores the mode's colours: the 16 standard colours, and in SCREEN 13 the standard 256-colour palette. SCREEN with the mode the program is already in only changes the pages, so a program can flip pages in a loop. Other mode numbers, and graphics statements in SCREEN 0, are error 5 (Illegal function call). The colour switch argument is accepted and ignored.</p>
|
||||
<p>Text uses 16-pixel-high characters in SCREEN 0 (25 rows), 11 and 12 (30 rows), 14-pixel ones in SCREEN 9 and 10 (25 rows), and 8-pixel ones everywhere else. The window shows each mode in the shape it has on a monitor: the 640 x 200 modes with every line doubled, 40-column text with every column doubled; SCREEN 9 and 10 show at 640 x 350 as they are. On the whole screen the 320 x 200 modes use the computer's 320 x 200 mode and the others the nearest mode, centred.</p>
|
||||
SCREEN 11 640 x 480, 2 colors 80 x 30 or 80 x 60 1
|
||||
SCREEN 12 640 x 480, 16 colors 80 x 30 or 80 x 60 1
|
||||
SCREEN 13 320 x 200, 256 colors 40 x 25 1</pre>
|
||||
<p>A program starts in SCREEN 0. SCREEN with a new mode (and WIDTH) clears the screen and restores the mode's colors: the 16 standard colors, and in SCREEN 13 the standard 256-color palette. SCREEN with the mode the program is already in only changes the pages, so a program can flip pages in a loop. Other mode numbers, and graphics statements in SCREEN 0, are error 5 (Illegal function call). The color switch argument is accepted and ignored.</p>
|
||||
<p>Text uses 16-pixel-high characters in SCREEN 0 (25 rows), 11 and 12 (30 rows), 14-pixel ones in SCREEN 9 and 10 (25 rows), and 8-pixel ones everywhere else. The window shows each mode in the shape it has on a monitor: the 640 x 200 modes with every line doubled, 40-column text with every column doubled; SCREEN 9 and 10 show at 640 x 350 as they are. On the whole screen the 320 x 200 modes use the computer's 320 x 200 mode and the others the nearest mode, centered.</p>
|
||||
<pre><code>SCREEN mode [, [colorswitch] [, [activepage] [, visualpage]]]
|
||||
WIDTH [columns] [, rows]</code></pre>
|
||||
<h2>Screen Pages and PCOPY</h2>
|
||||
|
|
@ -4024,10 +4044,10 @@ code = SCREEN(row, column [, colorflag])</code></pre>
|
|||
<ul>
|
||||
<li>CLS clears the screen and puts the cursor in the top-left corner (the top of the text viewport). In a graphics mode with a VIEW set, CLS (or CLS 1) clears only the view; with a VIEW PRINT set, CLS (or CLS 2) clears only the text viewport; CLS 0 clears everything.</li>
|
||||
<li>LOCATE moves the cursor (rows and columns count from 1). cursor 1 shows the text cursor in SCREEN 0, 0 hides it (the default). QBasic's cursor size arguments are accepted and ignored.</li>
|
||||
<li>COLOR in SCREEN 0 takes a foreground 0 to 31 and a background 0 to 15. Foregrounds 16 to 31 blink (colour minus 16); as on a VGA, backgrounds 8 to 15 show as 0 to 7 and make the text blink too.</li>
|
||||
<li>COLOR in SCREEN 1 takes a background colour (0 to 15) and a palette: an even number gives green, red, and brown for colours 1 to 3, an odd one (the default) cyan, magenta, and white. SCREEN 2 has no COLOR statement. In SCREEN 7 to 10 COLOR takes a foreground and a background colour (the colour of attribute 0: 0 to 15 in SCREEN 7 and 8, an EGA colour 0 to 63 in SCREEN 9, a shade 0 to 8 in SCREEN 10). In SCREEN 11 to 13 it takes only a foreground. The foreground is also the default colour of the drawing statements.</li>
|
||||
<li>COLOR in SCREEN 0 takes a foreground 0 to 31 and a background 0 to 15. Foregrounds 16 to 31 blink (color minus 16); as on a VGA, backgrounds 8 to 15 show as 0 to 7 and make the text blink too.</li>
|
||||
<li>COLOR in SCREEN 1 takes a background color (0 to 15) and a palette: an even number gives green, red, and brown for colors 1 to 3, an odd one (the default) cyan, magenta, and white. SCREEN 2 has no COLOR statement. In SCREEN 7 to 10 COLOR takes a foreground and a background color (the color of attribute 0: 0 to 15 in SCREEN 7 and 8, an EGA color 0 to 63 in SCREEN 9, a shade 0 to 8 in SCREEN 10). In SCREEN 11 to 13 it takes only a foreground. The foreground is also the default color of the drawing statements.</li>
|
||||
<li>CSRLIN is the cursor's row and POS(0) its column. Before the program has a screen, POS(0) is the output window's column.</li>
|
||||
<li>SCREEN(row, column) is the character code shown there; with a colorflag of 1, its colour (in SCREEN 0, foreground + 16 * background).</li>
|
||||
<li>SCREEN(row, column) is the character code shown there; with a colorflag of 1, its color (in SCREEN 0, foreground + 16 * background).</li>
|
||||
<li>PRINT scrolls the screen (or the text viewport) up at the bottom. CHR$(13) and CHR$(10) start a new line and CHR$(9) moves to the next multiple of 8 columns.</li>
|
||||
</ul>
|
||||
<h2>VIEW PRINT</h2>
|
||||
|
|
@ -4059,7 +4079,7 @@ Loop While InKey$ = ""</code></pre>
|
|||
<p>On the program's screen INPUT shows its prompt at the cursor and reads what is typed there: Backspace takes back a character, Esc clears the line, and Enter ends it. LINE INPUT reads a whole line, commas included, without adding "? " to the prompt. Without the program's screen LINE INPUT asks in a dialog box, like INPUT.</p>
|
||||
<pre><code>LINE INPUT ["prompt";] variable$</code></pre>
|
||||
<h2>Graphics Coordinates</h2>
|
||||
<p>Points are (x, y) in pixels from the top-left corner. STEP(x, y) is relative to the last point drawn (the centre of the screen at first). VIEW makes a smaller part of the screen the drawing area (coordinates start at its corner, and drawing stays inside it); WINDOW gives it coordinates of your own. Colour numbers are attributes: 0 to 3 in SCREEN 1 and 10, 0 and 1 in SCREEN 2 and 11, 0 to 15 in SCREEN 7, 8, 9, and 12, 0 to 255 in SCREEN 13; anything else is error 5.</p>
|
||||
<p>Points are (x, y) in pixels from the top-left corner. STEP(x, y) is relative to the last point drawn (the center of the screen at first). VIEW makes a smaller part of the screen the drawing area (coordinates start at its corner, and drawing stays inside it); WINDOW gives it coordinates of your own. Color numbers are attributes: 0 to 3 in SCREEN 1 and 10, 0 and 1 in SCREEN 2 and 11, 0 to 15 in SCREEN 7, 8, 9, and 12, 0 to 255 in SCREEN 13; anything else is error 5.</p>
|
||||
<pre><code>VIEW [[SCREEN] (x1, y1)-(x2, y2) [, [fill] [, border]]]
|
||||
WINDOW [[SCREEN] (x1, y1)-(x2, y2)]
|
||||
value = PMAP(coordinate, n)</code></pre>
|
||||
|
|
@ -4073,7 +4093,7 @@ value = PMAP(coordinate, n)</code></pre>
|
|||
PRESET [STEP](x, y) [, color]
|
||||
c = POINT(x, y)
|
||||
v = POINT(n)</code></pre>
|
||||
<p>PSET draws a point in the given colour or the COLOR foreground, PRESET in the given colour or colour 0. POINT(x, y) is the colour at a point, or -1 outside the view. POINT(0) and POINT(1) are the last point in pixels, POINT(2) and POINT(3) in WINDOW coordinates.</p>
|
||||
<p>PSET draws a point in the given color or the COLOR foreground, PRESET in the given color or color 0. POINT(x, y) is the color at a point, or -1 outside the view. POINT(0) and POINT(1) are the last point in pixels, POINT(2) and POINT(3) in WINDOW coordinates.</p>
|
||||
<h2>LINE</h2>
|
||||
<pre><code>LINE [[STEP](x1, y1)]-[STEP](x2, y2) [, [color] [, [B | BF] [, style]]]</code></pre>
|
||||
<p>Draws a line, a box (B), or a filled box (BF). Without a start point the line starts at the last point. style is a 16-bit pattern: each set bit (from the top) draws a pixel, each clear one skips it.</p>
|
||||
|
|
@ -4089,8 +4109,8 @@ CIRCLE (160, 100), 80, 2, , , 0.5 ' an ellipse</code></pre>
|
|||
<h2>PAINT</h2>
|
||||
<pre><code>PAINT [STEP](x, y) [, [color] [, border]]
|
||||
PAINT [STEP](x, y), tile$ [, [border] [, background$]]</code></pre>
|
||||
<p>Fills the area around the point with color, up to pixels of the border colour (by default the fill colour itself).</p>
|
||||
<p>With a string instead of a colour, PAINT fills the area with a pattern, as in QBasic. Each row of the pattern is one byte for each colour plane of the mode, and each bit is a pixel (the first bit is the left pixel): in SCREEN 2 and 11 one byte is eight pixels, colour 0 or 1; in SCREEN 7, 8, 9, and 12 four bytes (the blue, green, red, and bright planes) make eight pixels of 16 colours; in SCREEN 10 two bytes. In SCREEN 1 each byte is four pixels of two bits, and in SCREEN 13 each byte is one pixel. A pattern has up to 64 rows and repeats over the screen. The fill stops at the border colour (by default the COLOR foreground) and covers the whole area once, even where it already has the pattern's colours. background$ is accepted as in QBasic: a pattern with more than two rows in a row equal to it is error 5.</p>
|
||||
<p>Fills the area around the point with color, up to pixels of the border color (by default the fill color itself).</p>
|
||||
<p>With a string instead of a color, PAINT fills the area with a pattern, as in QBasic. Each row of the pattern is one byte for each color plane of the mode, and each bit is a pixel (the first bit is the left pixel): in SCREEN 2 and 11 one byte is eight pixels, color 0 or 1; in SCREEN 7, 8, 9, and 12 four bytes (the blue, green, red, and bright planes) make eight pixels of 16 colors; in SCREEN 10 two bytes. In SCREEN 1 each byte is four pixels of two bits, and in SCREEN 13 each byte is one pixel. A pattern has up to 64 rows and repeats over the screen. The fill stops at the border color (by default the COLOR foreground) and covers the whole area once, even where it already has the pattern's colors. background$ is accepted as in QBasic: a pattern with more than two rows in a row equal to it is error 5.</p>
|
||||
<pre><code>SCREEN 12
|
||||
LINE (0, 0)-(100, 100), 15, B
|
||||
PAINT (50, 50), CHR$(&HAA) + CHR$(&H55) + CHR$(0) + CHR$(0), 15 ' blue and green stripes</code></pre>
|
||||
|
|
@ -4109,12 +4129,12 @@ PAINT (50, 50), CHR$(&HAA) + CHR$(&H55) + CHR$(0) + CHR$(0), 15 ' b
|
|||
M x,y Move to x, y; with a sign (M+10,-5) move by that much.
|
||||
B Before a move: move without drawing.
|
||||
N Before a move: draw, then come back to where the move started.
|
||||
C n Colour of the lines that follow.
|
||||
C n Color of the lines that follow.
|
||||
S n Scale: moves are n/4 pixels a unit (1 to 255, default 4).
|
||||
A n Turn the directions by n * 90 degrees (0 to 3).
|
||||
TA n Turn the directions by n degrees (-360 to 360).
|
||||
P c,b PAINT at the current point with colour c up to border colour b.</pre>
|
||||
<p>The pen starts at the last point and stays where it ends. The colour, scale, and turn stay from one DRAW to the next. A mistake in the string is error 5.</p>
|
||||
P c,b PAINT at the current point with color c up to border color b.</pre>
|
||||
<p>The pen starts at the last point and stays where it ends. The color, scale, and turn stay from one DRAW to the next. A mistake in the string is error 5.</p>
|
||||
<p>As in QBasic, X runs another DRAW string and "=" takes a number, both given with VARPTR$: DRAW "X" + VARPTR$(shape$) and DRAW "C=" + VARPTR$(c) + "R=" + VARPTR$(n). DVX BASIC has no memory addresses, so VARPTR$ packs the value itself into its result (taken when VARPTR$ runs), and it takes any expression. Building the string with + and STR$ works too, such as DRAW "R" + STR$(n).</p>
|
||||
<pre><code>DRAW "BM100,100 C14 R50 D50 L50 U50" ' a square
|
||||
DRAW "BM160,100 TA45 C2 R40" ' a line at 45 degrees
|
||||
|
|
@ -4125,7 +4145,7 @@ NEXT i</code></pre>
|
|||
<h2>PALETTE</h2>
|
||||
<pre><code>PALETTE [attribute, color]
|
||||
PALETTE USING array[(first)]</code></pre>
|
||||
<p>Changes the colour an attribute shows. In SCREEN 11, 12, and 13, color is blue * 65536 + green * 256 + red with each part 0 to 63; in SCREEN 0 and 9 it is an EGA colour number 0 to 63; in SCREEN 1, 2, 7, and 8 one of the 16 standard colours; in SCREEN 10 a shade 0 to 8 (0 off, 4 grey, 8 bright, and 1 to 3, 5 to 7 blinking between two of them). PALETTE alone restores the mode's colours. PALETTE USING sets every attribute of the mode (256 in SCREEN 13) from a one-dimensional LONG array starting at element first (or its first element); -1 leaves that attribute as it is. On the whole screen a palette change shows at once, like on a VGA card; in the window, whatever is already drawn in that attribute changes colour too.</p>
|
||||
<p>Changes the color an attribute shows. In SCREEN 11, 12, and 13, color is blue * 65536 + green * 256 + red with each part 0 to 63; in SCREEN 0 and 9 it is an EGA color number 0 to 63; in SCREEN 1, 2, 7, and 8 one of the 16 standard colors; in SCREEN 10 a shade 0 to 8 (0 off, 4 gray, 8 bright, and 1 to 3, 5 to 7 blinking between two of them). PALETTE alone restores the mode's colors. PALETTE USING sets every attribute of the mode (256 in SCREEN 13) from a one-dimensional LONG array starting at element first (or its first element); -1 leaves that attribute as it is. On the whole screen a palette change shows at once, like on a VGA card; in the window, whatever is already drawn in that attribute changes color too.</p>
|
||||
<pre><code>SCREEN 13
|
||||
PALETTE 1, 63 * 65536 ' attribute 1 becomes bright blue
|
||||
FOR i = 0 TO 63
|
||||
|
|
@ -4527,7 +4547,7 @@ s$ = FORMATCURRENCY(n [, digits [, leadingDigit [, parens [, group]]]])
|
|||
s$ = FORMATPERCENT(n [, digits [, leadingDigit [, parens [, group]]]])
|
||||
s$ = FORMATDATETIME(d [, namedFormat])</code></pre>
|
||||
<p>These are Visual Basic 6's. FORMATNUMBER shows n with digits places after the point (-1, the default, means two), FORMATCURRENCY shows it as an amount of money, with $ in front, and FORMATPERCENT shows it times 100 with a % after it. leadingDigit, parens, and group are vbTrue, vbFalse, or vbUseDefault (the default): whether a number below 1 has a 0 before the point (by default it has), whether a negative number is in parentheses rather than after a minus sign (by default only an amount is), and whether thousands are separated by commas (by default they are). n must be a number or text that holds one (error 13 otherwise, error 94 for Null), and digits 0 to 99 (error 5 otherwise).</p>
|
||||
<p>FORMATDATETIME shows date d (a Date, a number, or text that holds a date) as namedFormat says: vbGeneralDate (0, the default: the date and the time, the date alone at midnight and the time alone on no date), vbLongDate (1), vbShortDate (2), vbLongTime (3), or vbShortTime (4, a 24-hour hh:mm). Another namedFormat raises error 5.</p>
|
||||
<p>FORMATDATETIME shows date d (a Date, a number, or text that holds a date) as namedFormat says: vbGeneralDate (0, the default: the date and the time, the date alone at midnight, and the time alone on no date), vbLongDate (1), vbShortDate (2), vbLongTime (3), or vbShortTime (4, a 24-hour hh:mm). Another namedFormat raises error 5.</p>
|
||||
<pre><code>Print FormatNumber(1234.567) ' 1,234.57
|
||||
Print FormatNumber(0.5, 2, vbFalse) ' .50
|
||||
Print FormatNumber(-5, 0, , vbTrue) ' (5)
|
||||
|
|
@ -4723,7 +4743,7 @@ Print Choose(Weekday(Date), "Sun", "Mon", "Tue", &
|
|||
<p>A Picture object has three properties, which can only be read:</p>
|
||||
<pre> Property Type Description
|
||||
-------- ---- -----------
|
||||
Width Long The picture's width in HiMetric units (hundredths of a millimetre), as in Visual Basic; 0 for an empty picture.
|
||||
Width Long The picture's width in HiMetric units (hundredths of a millimeter), as in Visual Basic; 0 for an empty picture.
|
||||
Height Long The picture's height in HiMetric units; 0 for an empty picture.
|
||||
Type Integer vbPicTypeBitmap (1) for a loaded picture, vbPicTypeNone (0) for an empty one.</pre>
|
||||
<p>The HiMetric sizes assume a standard display of 96 pixels an inch (the same as ScaleMode), so a pixel is about 26.46 HiMetric units. Convert them to pixels or another scale with a form's or PictureBox's ScaleX and ScaleY methods (see Drawing on Forms and PictureBoxes). Visual Basic's Handle property and Render method are not available: DVX pictures have no system handle.</p>
|
||||
|
|
@ -4760,7 +4780,7 @@ UNLOAD formVariable
|
|||
LOAD ControlName(index)
|
||||
UNLOAD ControlName(index)</code></pre>
|
||||
<p>LOAD and UNLOAD with a control's or menu item's name and an index (LOAD Text1(3), UNLOAD mnuRecent(i), LOAD Form2.Btn(1)) add and remove elements of a control array or a menu control array, as in Visual Basic; see Control Arrays.</p>
|
||||
<p>LOAD creates the form and its controls in memory. It fires the form's Load event (Form1_Load for a form named Form1) when the form is first loaded. UNLOAD destroys the form's window and controls, firing its QueryUnload event (which can cancel the close) and then its Unload event. As in Visual Basic, the program's form keeps its form-level variables: the next LOAD (or use of its name) runs its Load event with them as they were, until SET FormName = Nothing frees them (see SET). A copy made with New has its variables freed with it. The form name here is the literal name of the form as it appears in its .frm file; UNLOAD Me unloads the form whose event handler is running. The handler's code goes on after UNLOAD Me, and Me still means the form, as in Visual Basic: Me.Show, or a use of one of its properties or controls, loads it again, with its Load event and the variables it kept. LOAD and UNLOAD also take Me, a Form variable (Dim f As Form2), an Object holding a form, or anything else that gives a form (for example a form made with CreateForm and kept in an object's property): LOAD loads the form instance it refers to, as in Visual Basic -- a copy New made (Set f = New Form2: Load f), or the program's form taken as a reference (Set f = Form2) -- running its Load event and not showing it; LOAD of a form that is loaded does nothing. LOAD of an object that is no form (a control, a class instance, a Collection) raises error 361 (Can't load or unload this object), of Nothing error 91; a value that cannot be an object (a number, a string) does not compile. Once a form is unloaded, LOAD or any use of its name (a property, a control, Show) loads it again with its Load event, as in Visual Basic, even while code that ran the UNLOAD is still running; a second UNLOAD of the same form does nothing.</p>
|
||||
<p>LOAD creates the form and its controls in memory. It fires the form's Load event (Form1_Load for a form named Form1) when the form is first loaded. UNLOAD destroys the form's window and controls, firing its QueryUnload event and then its Unload event, as in Visual Basic; either can cancel the close (Sub Form1_Unload(Cancel As Integer): Cancel = 1 keeps the form loaded; a handler without the parameter just runs). QueryUnload's UnloadMode is vbFormCode for UNLOAD (see Form Events in the Form topic). As in Visual Basic, the program's form keeps its form-level variables: the next LOAD (or use of its name) runs its Load event with them as they were, until SET FormName = Nothing frees them (see SET). A copy made with New has its variables freed once nothing refers to it any more. A form instance's Initialize event (Form1_Initialize) runs as the instance is made -- the first use of the form's name, New, or LoadFormText -- before its Load, and its Terminate event once it is gone (see Form Events in the Form topic). The form name here is the literal name of the form as it appears in its .frm file; UNLOAD Me unloads the form whose event handler is running. The handler's code goes on after UNLOAD Me, and Me still means the form, as in Visual Basic: Me.Show, or a use of one of its properties or controls, loads it again, with its Load event and the variables it kept. LOAD and UNLOAD also take Me, a Form variable (Dim f As Form2), an Object holding a form, or anything else that gives a form (for example a form made with CreateForm and kept in an object's property): LOAD loads the form instance it refers to, as in Visual Basic -- a copy New made (Set f = New Form2: Load f), or the program's form taken as a reference (Set f = Form2) -- running its Load event and not showing it; LOAD of a form that is loaded does nothing. LOAD of an object that is no form (a control, a class instance, a Collection) raises error 361 (Can't load or unload this object), of Nothing error 91; a value that cannot be an object (a number, a string) does not compile. Once a form is unloaded, LOAD or any use of its name (a property, a control, Show) loads it again with its Load event, as in Visual Basic, even while code that ran the UNLOAD is still running; a second UNLOAD of the same form does nothing.</p>
|
||||
<p>As in Visual Basic, a program starts with its startup form only (the project's Startup Form, else its first form): that form is loaded, its Load event runs, and it is shown, before the program's module-level code runs. Every other form is loaded the first time the program refers to it: LOAD, Show, or the use of any of its properties, methods, or controls (Form2.Caption, Form2.Text1.Text) loads it first, with its Load event, so a form the program never uses costs nothing. Taking it as an object does not load it, as in Visual Basic: Set f = Form2, Form2 given for an object parameter, and f Is Form2 make a reference to the form, which loads at the first use of a property, method, or control through it (f.Caption, f.Show); the reference means the form whether it is loaded or not, so after UNLOAD a use of it loads the form again. UNLOAD of a form that is not loaded does nothing (it is not loaded first). A form's name always means the program's own form of that name: a copy made with New (Dim f As New Form2, or Set f = New Form2) is a form of its own, and using the name Form2 afterwards loads the program's Form2 if it is not loaded yet. A control's name used without its form (Text1 rather than Form2.Text1) is the form's own control in the form's code; in other code it is looked for on the forms that are loaded and must be on exactly one of them (error 1001 otherwise; see How Names Are Found).</p>
|
||||
<h2>Showing and Hiding Forms</h2>
|
||||
<pre><code>FormName.Show [mode]
|
||||
|
|
@ -4802,7 +4822,7 @@ If myCtrl Is Nothing Then Print "No control chosen"</code></pre>
|
|||
<pre><code>Option1(0).Value = True
|
||||
Label1(idx).Caption = "Item " & idx
|
||||
Me.Label1(i).Visible = True</code></pre>
|
||||
<p>LOAD name(index) adds an element to the array while the program runs, as in Visual Basic: a copy of the array's lowest element as the form file made it (its design-time properties: what the program has changed since is not copied) that starts hidden (set its Visible to True to show it). A control gets those properties -- its text, size, colours, font, Tag, and the others -- and its place after the array's last element in that element's container; a menu item gets the caption, check mark, and Enabled (not the Shortcut: a key runs one item) and its place right after the array's last element in its menu. UNLOAD name(index) removes an element LOAD made. LOAD of an element that is there raises error 360 (Object already loaded), UNLOAD of one that is not error 340, UNLOAD of one the .frm file made error 362 (Can't unload controls created at design time), an index after a control or menu item in no array error 343, and LOAD or UNLOAD of a control named alone error 361 (Can't load or unload this object). The array is looked for as a control named alone is (see How Names Are Found), or on the form named before it (LOAD Form2.Btn(1)).</p>
|
||||
<p>LOAD name(index) adds an element to the array while the program runs, as in Visual Basic: a copy of the array's lowest element as the form file made it (its design-time properties: what the program has changed since is not copied) that starts hidden (set its Visible to True to show it). A control gets those properties -- its text, size, colors, font, Tag, and the others -- and its place after the array's last element in that element's container; a menu item gets the caption, check mark, and Enabled (not the Shortcut: a key runs one item) and its place right after the array's last element in its menu. UNLOAD name(index) removes an element LOAD made. LOAD of an element that is there raises error 360 (Object already loaded), UNLOAD of one that is not error 340, UNLOAD of one the .frm file made error 362 (Can't unload controls created at design time), an index after a control or menu item in no array error 343, and LOAD or UNLOAD of a control named alone error 361 (Can't load or unload this object). The array is looked for as a control named alone is (see How Names Are Found), or on the form named before it (LOAD Form2.Btn(1)).</p>
|
||||
<pre><code>' A recent-files list: mnuRecent(0) is a separator in the .frm file,
|
||||
' Visible = False; each file gets an element after it
|
||||
Dim recentCount As Integer
|
||||
|
|
@ -4853,7 +4873,7 @@ End With</code></pre>
|
|||
<p>Removes a control from a form. A later use of the removed control through a reference to it raises error 364 (Object was unloaded), as does one of a control of a form that has been unloaded.</p>
|
||||
<h3>LoadFormText</h3>
|
||||
<pre><code>SET formVar = LOADFORMTEXT(frmText$)</code></pre>
|
||||
<p>Loads a form from the text of a .frm file -- one a program made, read from a file, or got from somewhere else -- and returns it, loaded but hidden like Load (its Load event runs; call Show). A form whose name is already loaded becomes another copy of its own, as with New, and so does one named like one of the program's own forms, loaded or not: the name keeps meaning the program's form. The form's controls fire events to procedures named after them in the running program (Gen1_Load, Go_Click), as for any form; a code section after the form's End is not compiled. Text that is not a form raises error 5 (Illegal function call). Form designers use it to show a .frm file being edited; Controls, CallByName, and the designer.bas functions then read and change it.</p>
|
||||
<p>Loads a form from the text of a .frm file -- one a program made, read from a file, or got from somewhere else -- and returns it, loaded but hidden like Load (its Load event runs; call Show). As for any form instance, its Initialize event runs before its Load, and its Terminate event as its Unload frees it. A form whose name is already loaded becomes another copy of its own, as with New, and so does one named like one of the program's own forms, loaded or not: the name keeps meaning the program's form. The form's controls fire events to procedures named after them in the running program (Gen1_Load, Go_Click), as for any form; a code section after the form's End is not compiled. Text that is not a form raises error 5 (Illegal function call). Form designers use it to show a .frm file being edited; Controls, CallByName, and the designer.bas functions then read and change it.</p>
|
||||
<pre><code>Dim f As Object
|
||||
Dim n As Integer
|
||||
Dim t As String
|
||||
|
|
@ -4939,9 +4959,11 @@ End Sub</code></pre>
|
|||
Scroll Control was scrolled (mouse wheel or scrollbar)
|
||||
GotFocus Control received input focus
|
||||
LostFocus Control lost input focus
|
||||
Form1_Initialize A form instance was made (the first use of the form's name, New, or LoadFormText), before its Load
|
||||
Form1_Load Form is being loaded (fires once, after controls are created)
|
||||
Form1_QueryUnload Form is about to close; set Cancel = 1 to abort
|
||||
Form1_Unload Form is being unloaded
|
||||
Form1_QueryUnload Form is about to close (Cancel As Integer, UnloadMode As Integer): set Cancel = 1 to abort; UnloadMode says why (vbFormControlMenu, vbFormCode, vbAppWindows, vbAppTaskManager)
|
||||
Form1_Unload Form is being unloaded, after QueryUnload; set Cancel = 1 to keep it loaded
|
||||
Form1_Terminate A form instance is gone: not loaded, and nothing refers to it any more (or the program ended)
|
||||
Form1_Resize Form was resized
|
||||
Form1_Activate Form gained focus
|
||||
Form1_Deactivate Form lost focus
|
||||
|
|
@ -4991,7 +5013,7 @@ Set acct = Nothing ' prints "Account for Scott closed"</c
|
|||
Attribute VB_Name = "Account"
|
||||
|
||||
Option Explicit</code></pre>
|
||||
<p>The header is everything before the first line of code: blank lines, a VERSION line, a BEGIN ... END block and Attribute VB_... lines, in that order. All of it is optional, and a Visual Basic .cls file can be added as it is. The class's name comes from the Attribute VB_Name line; without one, the name is the file's name without .cls (ACCOUNT.CLS makes a class named ACCOUNT). The class name is the type name used in DIM ... AS, NEW, TypeOf, and TYPENAME.</p>
|
||||
<p>The header is everything before the first line of code: blank lines, a VERSION line, a BEGIN ... END block, and Attribute VB_... lines, in that order. All of it is optional, and a Visual Basic .cls file can be added as it is. The class's name comes from the Attribute VB_Name line; without one, the name is the file's name without .cls (ACCOUNT.CLS makes a class named ACCOUNT). The class name is the type name used in DIM ... AS, NEW, TypeOf, and TYPENAME.</p>
|
||||
<h2>What a Class Contains</h2>
|
||||
<p>Outside its procedures, a class module may hold only declarations: member variables, CONSTs, OPTION and DEFtype statements, and Attribute lines. Statements that do something belong in a procedure, usually Class_Initialize. The members are:</p>
|
||||
<pre> Member Written as Used from outside as
|
||||
|
|
@ -5121,7 +5143,7 @@ NoMoney:
|
|||
</div>
|
||||
<div class="topic" id="lang.events">
|
||||
<h1>Events</h1>
|
||||
<p>A class module can announce that something happened -- a download finished, a value changed, a step of a long job was done -- and let the code that uses its objects react, the way a form reacts to a button's Click. The class declares the event and raises it; the program declares a variable WithEvents and writes a SUB for each event it wants to handle.</p>
|
||||
<p>A class module can announce that something happened -- a download finished, a value changed, a step of a long job was done -- and let the code that uses its objects react, the way a form reacts to a button's Click. The class declares the event and raises it; the program declares a variable WithEvents and writes a SUB for each event it wants to handle. A form's code can declare and raise events of its own the same way (see A Form's Own Events below).</p>
|
||||
<h2>Declaring and Raising an Event</h2>
|
||||
<p>In the class module, declare each event at the top with EVENT, then raise it from any of the class's procedures with RAISEEVENT:</p>
|
||||
<pre><code>' class module Downloader
|
||||
|
|
@ -5137,7 +5159,7 @@ Public Sub Start()
|
|||
Next
|
||||
RaiseEvent Done
|
||||
End Sub</code></pre>
|
||||
<p>An event may have parameters but no return value. Its parameters cannot be OPTIONAL or a PARAMARRAY, and an event is always public (Public Event and Event mean the same; Private Event is an error). RAISEEVENT can only be used inside the class's own procedures, with exactly the arguments the event declares. A parameter without BYVAL is passed by reference, so a handler can change the variable given for it -- the cancel flag above is how a handler asks the class to stop. This holds for a variable, an array element (a(i)), and a TYPE field (rec.f, arr(i).f), as in Visual Basic. When several handlers get the event they all get the same variable, so each sees what the one before it stored; every store is converted to the variable's or field's type at once, as an assignment would be. While the handlers run, the arrays whose elements (or elements' fields) were given are locked: REDIM of one of them, ERASE of a dynamic one, or another array assigned to one raises error 10. An expression, or a variable in its own parentheses, given for a by-reference parameter is passed as one temporary value that every handler shares, as in Visual Basic: the variable itself does not change, but a handler sees what the one before it stored. An argument is converted to the type of a typed event parameter, with the rules of SUB calls (a variable of another type given by reference is a compile error).</p>
|
||||
<p>An event may have parameters but no return value. Its parameters cannot be OPTIONAL or a PARAMARRAY, and an event is always public (Public Event and Event mean the same; Private Event is an error). RAISEEVENT can only be used inside the class's (or the form's) own procedures, with exactly the arguments the event declares. A parameter without BYVAL is passed by reference, so a handler can change the variable given for it -- the cancel flag above is how a handler asks the class to stop. This holds for a variable, an array element (a(i)), and a TYPE field (rec.f, arr(i).f), as in Visual Basic. When several handlers get the event they all get the same variable, so each sees what the one before it stored; every store is converted to the variable's or field's type at once, as an assignment would be. While the handlers run, the arrays whose elements (or elements' fields) were given are locked: REDIM of one of them, ERASE of a dynamic one, or another array assigned to one raises error 10. An expression, or a variable in its own parentheses, given for a by-reference parameter is passed as one temporary value that every handler shares, as in Visual Basic: the variable itself does not change, but a handler sees what the one before it stored. An argument is converted to the type of a typed event parameter, with the rules of SUB calls (a variable of another type given by reference is a compile error).</p>
|
||||
<h2>Handling Events</h2>
|
||||
<p>In a module, a form, or another class module, declare a variable of the class WithEvents, outside any procedure, and write a SUB named variable_EventName with the same parameters as the event:</p>
|
||||
<pre><code>Dim WithEvents dl As Downloader
|
||||
|
|
@ -5194,7 +5216,7 @@ Private Sub btn_Click()
|
|||
End Sub</code></pre>
|
||||
<p>A control's handlers run in the order their variables were declared (the modules' and the forms' first, then those of objects), each with its own form's variables, or as its object (Me). Setting the variable to another control, or to Nothing, moves its handlers at once. An argument a handler may change (KeyAscii, Cancel) reaches each handler as the handlers before it left it, as in Visual Basic: the control's own handler setting KeyAscii = 0 is seen by the variable's handler, and the last value left is the one the control takes.</p>
|
||||
<h2>Events of a Form</h2>
|
||||
<p>A variable declared As one of the program's forms (Dim WithEvents f As Form2), or As Form for any form, may be WithEvents too, as in Visual Basic: the form instance the variable holds sends each of its events -- Load, Unload, QueryUnload, Resize, Activate, Deactivate, Click, the mouse and key events, Paint, and the others -- to the variable's handler of it (f_Load, f_QueryUnload), after the form's own handler (Form2_Load). The variable may hold the form its name means (Set f = Form2) or a copy New made (Set f = New Form2); neither is loaded by the Set, so f_Load runs when the form loads at its first use (f.Show), as in Visual Basic. A handler of QueryUnload gets the Cancel the form's own handler left, and either may set it to keep the form loaded:</p>
|
||||
<p>A variable declared As one of the program's forms (Dim WithEvents f As Form2), or As Form for any form, may be WithEvents too, as in Visual Basic: the form instance the variable holds sends each of its events -- Load, Unload, QueryUnload, Resize, Activate, Deactivate, Click, the mouse and key events, Paint, and the others -- to the variable's handler of it (f_Load, f_QueryUnload), after the form's own handler (Form2_Load). The variable may hold the form its name means (Set f = Form2) or a copy New made (Set f = New Form2); neither is loaded by the Set, so f_Load runs when the form loads at its first use (f.Show), as in Visual Basic. A handler of QueryUnload (or Unload) gets the Cancel the form's own handler left, and either may set it to keep the form loaded; QueryUnload's UnloadMode says why the form closes (a handler may take Cancel alone, as for the form's own handler):</p>
|
||||
<pre><code>' module: keep the settings form from closing while it has unsaved changes
|
||||
Public WithEvents settings As SettingsForm
|
||||
|
||||
|
|
@ -5203,17 +5225,41 @@ Sub ShowSettings()
|
|||
settings.Show
|
||||
End Sub
|
||||
|
||||
Sub settings_QueryUnload(Cancel As Integer)
|
||||
If settings.Dirty Then Cancel = 1
|
||||
Sub settings_QueryUnload(Cancel As Integer, UnloadMode As Integer)
|
||||
If settings.Dirty And UnloadMode <> vbAppWindows Then Cancel = 1
|
||||
End Sub
|
||||
|
||||
Sub settings_Unload()
|
||||
Set settings = Nothing
|
||||
End Sub</code></pre>
|
||||
<p>A class module can watch any form the same way (Private WithEvents frm As Form, Sub frm_Resize), for example to lay out the controls of whichever form it is given.</p>
|
||||
<p>A form's Initialize and Terminate events reach the form's own handlers only, as in Visual Basic: no variable can hold an instance as it is being made, and Terminate runs once nothing refers to it any more.</p>
|
||||
<h2>A Form's Own Events</h2>
|
||||
<p>A form's code can declare events of its own and raise them, exactly as a class module does: EVENT (or PUBLIC EVENT) at the top of the form's code, outside its procedures, and RAISEEVENT in its procedures. A variable declared WithEvents As that form (Dim WithEvents f As Form2) handles them with SUBs named f_EventName, whose parameters must match the event's, as for a class's events; arguments without BYVAL go by reference to every handler in turn. The event comes from the form instance whose code raises it (Me), loaded or not, and reaches the variables that hold that instance. A variable declared As Form gets a form's built-in events only, as in Visual Basic, not those its code declares. A form's event may not take the name of an event every form has -- Initialize, Load, QueryUnload, Unload, Terminate, Activate, Deactivate, Resize, Paint, Click, DblClick, GotFocus, LostFocus, the mouse and key events (MouseDown, KeyPress ...), DragDrop, DragOver, and DVX's NewArgs, FullScreen, and design-mode events -- because its WithEvents handlers name both kinds the same way: as in Visual Basic, that does not compile (Ambiguous name). Any other name is the form's own, even one a control's event has (Event Change, Event Timer: Sub f_Change handles it).</p>
|
||||
<pre><code>' code of form Picker
|
||||
Public Event Chosen(ByVal item As String, Cancel As Boolean)
|
||||
|
||||
Private Sub OkButton_Click()
|
||||
Dim stopIt As Boolean
|
||||
RaiseEvent Chosen(List1.Text, stopIt)
|
||||
If Not stopIt Then Unload Me
|
||||
End Sub
|
||||
|
||||
' module
|
||||
Public WithEvents pick As Picker
|
||||
|
||||
Sub ChooseOne()
|
||||
Set pick = New Picker
|
||||
pick.Show
|
||||
End Sub
|
||||
|
||||
Sub pick_Chosen(ByVal item As String, Cancel As Boolean)
|
||||
If item = "" Then Cancel = True
|
||||
End Sub</code></pre>
|
||||
<h2>Rules</h2>
|
||||
<ul>
|
||||
<li>WITHEVENTS goes with DIM, PUBLIC, or PRIVATE at the top level of a module, form, or class module (not inside a procedure), for a single variable declared as a class module's name, a form (one of the program's forms, or Form), or a control type (not Control). It cannot be an array and cannot use New: Set it to an object in code.</li>
|
||||
<li>EVENT goes at the top level of a class module or a form's code; RAISEEVENT in a procedure of that class module or form.</li>
|
||||
<li>A WithEvents variable is visible to the procedures of its module or form without SHARED, as the handlers and the code that sets it need; in a class module it is a member variable of each object.</li>
|
||||
<li>Handlers are SUBs named variable_EventName in the same module, form, or class module as the variable (a module's in the same module file).</li>
|
||||
<li>EVENT, RAISEEVENT, WITHEVENTS, and IMPLEMENTS are not reserved words: they only have their meaning where a name follows them in those places, so a program may still use them as its own names.</li>
|
||||
|
|
@ -5438,9 +5484,9 @@ If Clipboard.GetFormat(vbCFText) Then Text2.Text = Clipboard.GetText()</code></p
|
|||
</div>
|
||||
<div class="topic" id="lang.printerobj">
|
||||
<h1>Printer Object</h1>
|
||||
<p>The Printer object draws pages on the printer chosen in the Control Panel, as in Visual Basic: text in any font at a size in points, lines, boxes, circles, dots, and pictures, anywhere on the page, page after page. It needs a printer model that prints pictures (the Control Panel's Printer page); on a color printer the colors print as they are, on the others in shades of grey.</p>
|
||||
<p>The Printer object draws pages on the printer chosen in the Control Panel, as in Visual Basic: text in any font at a size in points, lines, boxes, circles, dots, and pictures, anywhere on the page, page after page. It needs a printer model that prints pictures (the Control Panel's Printer page); on a color printer the colors print as they are, on the others in shades of gray.</p>
|
||||
<p>On a PostScript printer the page is drawn by the printer itself, as lines, curves, and letters rather than dots, so it prints as sharp as the printer can. Text is in the printer's own Helvetica, Times, or Courier, whichever is nearest FontName: Courier for a fixed-pitch font or a name with Mono or Courier in it, Times for a name with Serif, Times, Roman, Tinos, or Ledger in it (but not Sans), and Helvetica for the rest. TextWidth and TextHeight measure the printer's letters, so text lines up as it will print.</p>
|
||||
<p>A page is 8 by 10 inches. Its coordinates are twips (1440 an inch) until ScaleMode or Scale changes them, as on Visual Basic's Printer, so a program can place things in inches, centimetres, points, or its own units. Drawing goes to the page being made; NewPage prints it and starts the next, and EndDoc prints the last one and ends the document. The document starts when the first page is printed, at the printer and with the copies the program's last PrintChoose (print.bas) chose, or else as the Control Panel has them; while it prints, the Printing window shows, with Cancel. A program that ends with a page drawn or a document started has EndDoc done for it. A program ended with End Task (in the Task Manager) prints nothing more: the page drawn is thrown away and the rest of the document is not sent, so ending it never waits for the printer or asks about it.</p>
|
||||
<p>A page is 8 by 10 inches. Its coordinates are twips (1440 an inch) until ScaleMode or Scale changes them, as on Visual Basic's Printer, so a program can place things in inches, centimeters, points, or its own units. Drawing goes to the page being made; NewPage prints it and starts the next, and EndDoc prints the last one and ends the document. The document starts when the first page is printed, at the printer and with the copies the program's last PrintChoose (print.bas) chose, or else as the Control Panel has them; while it prints, the Printing window shows, with Cancel. A program that ends with a page drawn or a document started has EndDoc done for it. A program ended with End Task (in the Task Manager) prints nothing more: the page drawn is thrown away and the rest of the document is not sent, so ending it never waits for the printer or asks about it.</p>
|
||||
<pre> Method Description
|
||||
------ -----------
|
||||
Printer.Print items Text at CurrentX / CurrentY in the font and ForeColor, as PRINT lays it out: ; joins, a comma goes to the next 14-character zone, TAB(n) and SPC(n) count characters of the font (its 0's width), and a new line goes down a line of the font. CurrentX / CurrentY move past it. An array or a TYPE record raises error 13 (Type mismatch), which ON ERROR can trap.
|
||||
|
|
@ -5490,20 +5536,20 @@ End Sub</code></pre>
|
|||
-------- ----- -----------
|
||||
vbPRORPortrait 1 Printer.Orientation: upright pages (the only one)
|
||||
vbPRORLandscape 2 Printer.Orientation: sideways pages (not supported)
|
||||
vbPRCMMonochrome 1 Printer.ColorMode: black (and grey) only
|
||||
vbPRCMMonochrome 1 Printer.ColorMode: black (and gray) only
|
||||
vbPRCMColor 2 Printer.ColorMode: color</pre>
|
||||
</div>
|
||||
<div class="topic" id="lang.screenobj">
|
||||
<h1>Screen Object</h1>
|
||||
<p>The Screen object is the DVX desktop, as in Visual Basic: its size, so a program can place its forms (for example in a corner of the screen), its colour depth, the mouse pointer, and the arrangement of the windows on it.</p>
|
||||
<p>The Screen object is the DVX desktop, as in Visual Basic: its size, so a program can place its forms (for example in a corner of the screen), its color depth, the mouse pointer, and the arrangement of the windows on it.</p>
|
||||
<pre> Property Type R/W Description
|
||||
-------------------- ------- --- -----------
|
||||
Screen.Width Long R Width of the desktop in pixels
|
||||
Screen.Height Long R Height of the desktop in pixels
|
||||
Screen.BitsPerPixel Long R Colour depth of the display: 8, 15, 16, 24, or 32 bits per pixel
|
||||
Screen.BitsPerPixel Long R Color depth of the display: 8, 15, 16, 24, or 32 bits per pixel
|
||||
Screen.MousePointer Integer R/W vbHourglass (11) for the busy pointer while a long job runs; another pointer (vbArrow, vbCrosshair, vbSizeNS, vbSizeWE, vbSizeNWSE, vbSizeNESW, vbNoDrop: see Mouse Constants) over every form of the program, whatever their controls' MousePointer; vbDefault (0) back to each control's own
|
||||
Screen.ActiveControl Control R The control of the program that has the keyboard focus, Nothing when none has it (another program's window has the focus)
|
||||
Screen.DebugLayout Boolean R/W True draws a coloured border around every layout container (VBox, HBox, Frame ...) in every window, to see how a form is laid out; False removes them</pre>
|
||||
Screen.DebugLayout Boolean R/W True draws a colored border around every layout container (VBox, HBox, Frame ...) in every window, to see how a form is laid out; False removes them</pre>
|
||||
<p>The sizes are in pixels, the unit of a form's Left, Top, Width, and Height in DVX (Visual Basic uses twips there).</p>
|
||||
<p>Screen is an object like any other, as in Visual Basic, and so is Printer: Set o = Screen, an argument for an Object parameter, TypeName(Screen) ("Screen"), and o Is Screen work, and the properties and methods are reached through the variable (o.Width). Their names are types too, as in Visual Basic (Dim s As Screen, Sub Report(p As Printer)): a variable or parameter of the type holds that object only, and another object stored there raises error 13 (Type mismatch), or does not compile when the compiler can tell. Screen alone is the object; QBasic's SCREEN function always has its arguments (SCREEN(row, col)). A control or form of your own named Screen or Printer takes the name's place.</p>
|
||||
<pre><code>' Put the form at the right edge, 40 pixels from the top
|
||||
|
|
@ -5525,7 +5571,7 @@ Screen.MousePointer = vbDefault</code></pre>
|
|||
<pre><code>Sub mnuCascade_Click ()
|
||||
Screen.Arrange vbCascade
|
||||
End Sub</code></pre>
|
||||
<p>Any other property or method raises error 438 (Object doesn't support this property or method), a property that can only be read error 383 (Property is read-only), Arrange with another value error 5 and without one error 449: ON ERROR traps each. The QBasic statement SCREEN and function SCREEN(row, column) are unaffected: Screen followed by a dot is the object. A control or form of your own named Screen takes the name's place.</p>
|
||||
<p>Any other property or method raises error 438 (Object doesn't support this property or method), a property that can only be read error 383 (Property is read-only), Arrange with another value error 5, and without one error 449: ON ERROR traps each. The QBasic statement SCREEN and function SCREEN(row, column) are unaffected: Screen followed by a dot is the object. A control or form of your own named Screen takes the name's place.</p>
|
||||
</div>
|
||||
<div class="topic" id="lang.ini">
|
||||
<h1>INI Functions</h1>
|
||||
|
|
@ -5585,6 +5631,16 @@ IniWrite App.User & "\app.ini", "Display", "FontSiz
|
|||
vbTileGrid 4 Arrange: windows in rows and columns
|
||||
vbBringToFront 0 ZOrder: in front of the other windows (the default)
|
||||
vbSendToBack 1 ZOrder: behind the other windows</pre>
|
||||
<h2>QueryUnload Constants</h2>
|
||||
<p>Why a form closes: the UnloadMode argument of its QueryUnload event (see Form Events in the Form topic).</p>
|
||||
<pre> Constant Value Description
|
||||
-------- ----- -----------
|
||||
vbFormControlMenu 0 The user closed the form's window: its close box, Alt+F4, or its system menu's Close
|
||||
vbFormCode 1 UNLOAD in the program's code
|
||||
vbAppWindows 2 DVX is exiting (Exit DVX asks every program to close)
|
||||
vbAppTaskManager 3 Another program asked this one to close (ShellRunningClose), or DVX ended its screen saver
|
||||
vbFormMDIForm 4 Never passed: DVX has no MDI forms
|
||||
vbFormOwner 5 Never passed: DVX has no owned forms</pre>
|
||||
<h2>File Attribute Flags</h2>
|
||||
<p>Bit values used with GETATTR and SETATTR.</p>
|
||||
<pre> Constant Value Description
|
||||
|
|
@ -5671,8 +5727,8 @@ IniWrite App.User & "\app.ini", "Display", "FontSiz
|
|||
vbHourglass 11 MousePointer: busy
|
||||
vbNoDrop 12 MousePointer: a circle with a line through it</pre>
|
||||
<p>Visual Basic's other pointers (vbIbeam, vbUpArrow, custom pointers) have no DVX shape; DVX has no MouseIcon.</p>
|
||||
<h2>Syntax Colour Constants</h2>
|
||||
<p>The kinds of text a TextArea colours: the index of SetSyntaxColor and GetSyntaxColor, and the digits of the Colors argument of the Colorize event ("0" is vbSyntaxText ... "6" vbSyntaxType).</p>
|
||||
<h2>Syntax Color Constants</h2>
|
||||
<p>The kinds of text a TextArea colors: the index of SetSyntaxColor and GetSyntaxColor, and the digits of the Colors argument of the Colorize event ("0" is vbSyntaxText ... "6" vbSyntaxType).</p>
|
||||
<pre> Constant Value Description
|
||||
-------- ----- -----------
|
||||
vbSyntaxText 0 Ordinary text (ForeColor)
|
||||
|
|
@ -5725,9 +5781,9 @@ End Sub</code></pre>
|
|||
vbPixels 3 Pixels (the DVX default ScaleMode)
|
||||
vbCharacters 4 Characters (120 twips across, 240 down)
|
||||
vbInches 5 Inches
|
||||
vbMillimeters 6 Millimetres
|
||||
vbCentimeters 7 Centimetres
|
||||
vbHimetric 8 Hundredths of a millimetre (ScaleX / ScaleY only; a Picture's Width and Height)
|
||||
vbMillimeters 6 Millimeters
|
||||
vbCentimeters 7 Centimeters
|
||||
vbHimetric 8 Hundredths of a millimeter (ScaleX / ScaleY only; a Picture's Width and Height)
|
||||
vbPicTypeNone 0 Picture.Type of an empty picture
|
||||
vbPicTypeBitmap 1 Picture.Type of a loaded picture</pre>
|
||||
<h2>Fill and Pen Constants</h2>
|
||||
|
|
@ -5887,7 +5943,7 @@ If c <> -1 Then
|
|||
Label1.ForeColor = c
|
||||
End If</code></pre>
|
||||
<h2>Font Dialog</h2>
|
||||
<p>With commdlg.bas in the project, DlgFont(title, family, size, style, flags) shows the font dialog: the font families, the styles and sizes each comes in, Underline and Strikeout boxes, and a sample. It starts at the font named by family, size (in pixels), and style, and returns True when the user chooses OK. DlgFontName$(), DlgFontSize(), and DlgFontStyle() then give the font chosen; after Cancel they give the font the dialog started at. style adds up FONT_BOLD, FONT_ITALIC, FONT_UNDERLINE, and FONT_STRIKE, the constants of font.bas (add it to the project too, or use 1, 2, 4, and 8). With flags DLG_FONT_FIXED the dialog lists only the fixed-pitch families, for text that must line up in columns; with 0 it lists them all. The dialog's Licence button shows the chosen font's notice and licence. The answers fit a control's or a form's Font properties (see Fonts).</p>
|
||||
<p>With commdlg.bas in the project, DlgFont(title, family, size, style, flags) shows the font dialog: the font families, the styles and sizes each comes in, Underline and Strikeout boxes, and a sample. It starts at the font named by family, size (in pixels), and style, and returns True when the user chooses OK. DlgFontName$(), DlgFontSize(), and DlgFontStyle() then give the font chosen; after Cancel they give the font the dialog started at. style adds up FONT_BOLD, FONT_ITALIC, FONT_UNDERLINE, and FONT_STRIKE, the constants of font.bas (add it to the project too, or use 1, 2, 4, and 8). With flags DLG_FONT_FIXED the dialog lists only the fixed-pitch families, for text that must line up in columns; with 0 it lists them all. The dialog's License button shows the chosen font's notice and license. The answers fit a control's or a form's Font properties (see Fonts).</p>
|
||||
<pre><code>' With commdlg.bas and font.bas added to the project
|
||||
Dim style As Long
|
||||
|
||||
|
|
@ -5960,7 +6016,7 @@ End Sub</code></pre>
|
|||
SerGetRi(com) True while the other end rings.
|
||||
SerLineErrors(com) Errors seen on received data, added up: SER_LINE_OVERRUN (data came faster than it was read), SER_LINE_PARITY, SER_LINE_FRAMING, SER_LINE_BREAK; 0 for none.</pre>
|
||||
<h2>Printing</h2>
|
||||
<p>With print.bas in the project, a program prints like the programs that come with DVX. PrintTextDialog shows the Print dialog (printer, copies, pages) and prints the text on pages laid out by the page setup: margins, a header, and a footer with the document name, date, and page number. PrintPageSetup shows the Page Setup dialog, which the user's choices are saved from for every program. PrintPictureDialog prints a picture file scaled to the page, on printer models that print pictures (PrintCanPrintPictures says whether the chosen one does), in color on a color printer (PrintCanPrintColor says whether it is one) and in shades of grey on the others. PrintText and PrintPicture print without asking first. Each returns True when it printed.</p>
|
||||
<p>With print.bas in the project, a program prints like the programs that come with DVX. PrintTextDialog shows the Print dialog (printer, copies, pages) and prints the text on pages laid out by the page setup: margins, a header, and a footer with the document name, date, and page number. PrintPageSetup shows the Page Setup dialog, which the user's choices are saved from for every program. PrintPictureDialog prints a picture file scaled to the page, on printer models that print pictures (PrintCanPrintPictures says whether the chosen one does), in color on a color printer (PrintCanPrintColor says whether it is one) and in shades of gray on the others. PrintText and PrintPicture print without asking first. Each returns True when it printed.</p>
|
||||
<pre><code>Sub mnuPrint_Click ()
|
||||
PrintTextDialog txtNotes.Text, "Notes"
|
||||
End Sub
|
||||
|
|
@ -5991,7 +6047,7 @@ End If</code></pre>
|
|||
<pre> Function Description
|
||||
-------- -----------
|
||||
PrintPageSetting(prefs, field) A number of the page setup: "Lines" (lines per page, 0 = the printer's usual length), "Columns", "MarginTop", "MarginBottom", "MarginLeft", "MarginRight", "TabWidth", or "Wrap" (True: long lines wrap at a space); -1 for an unknown field.
|
||||
PrintPageText$(prefs, field) "Header" or "Footer". In them &f is the document name, &p the page, &n the number of pages, &d the date, &t the time, && an ampersand; &l, &c, and &r put what follows left, centred, or right.
|
||||
PrintPageText$(prefs, field) "Header" or "Footer". In them &f is the document name, &p the page, &n the number of pages, &d the date, &t the time, && an ampersand; &l, &c, and &r put what follows left, centered, or right.
|
||||
PrintPageSetupProblem$(lines, columns, marginTop, marginBottom, marginLeft, marginRight, tabWidth, wrap, header, footer) "" when this page setup can be used, else why not.
|
||||
PrintPageSettingsStore(prefs, lines, columns, marginTop, marginBottom, marginLeft, marginRight, tabWidth, wrap, header, footer) Put a page setup into the settings (then PrefsSave). False for one PrintPageSetupProblem$ objects to.
|
||||
PrintPageLines(prefs, model) Lines per page the setup gives on printer model.</pre>
|
||||
|
|
@ -6163,7 +6219,7 @@ If rc = PKGNET_DONE And PkgOfferServerStart(s, PkgNetDir$(n)) Then
|
|||
offer = PkgOfferIndex(s, "acme.chess")
|
||||
' plan and install offer as above; once installed, PkgNetClear n
|
||||
End If</code></pre>
|
||||
<p>Making packages. PkgBuildStart(s, template, files, out, secret) starts building a package, a job run with PkgRunFor like an install (PkgRunCurrent$ is the file it is on): template is a settings file with a [package] section (id, name, version, kind, and summary, publisher, author, licence, homepage, dvx as wanted) and a [depends] section (id = oldest version for each package it needs); files are rows of a name in the package (from the DVX folder, such as APPS\ACME\CHESS\CHESS.APP) and the file it is made from; secret is the secret key file (.SEC) to sign with, or "". PkgFolderRows$(s, folder, prefix) gives those rows for every file in a folder, and PkgKindFolder$(kind, id) the folder a package of that kind keeps its files in. PkgSignStart(s, path, secret, detached) signs a package already built: into it, a job run the same way, or beside it (NAME.SIG) when detached, done at once. PkgKeygen(s, name, base) makes a key pair (base.KEY to give out, base.SEC to keep private), and PkgKeyInfo$ reads a key file's name and id. PkgIdValid and PkgVersionValid check an id and a version before building; PkgVersionCompare(a, b) says which of two versions is newer (-1, 0, or 1: "1.10.0" is newer than "1.9.2"); PkgKindName$ lists the kinds.</p>
|
||||
<p>Making packages. PkgBuildStart(s, template, files, out, secret) starts building a package, a job run with PkgRunFor like an install (PkgRunCurrent$ is the file it is on): template is a settings file with a [package] section (id, name, version, kind, and summary, publisher, author, license, homepage, and dvx as wanted) and a [depends] section (id = oldest version for each package it needs); files are rows of a name in the package (from the DVX folder, such as APPS\ACME\CHESS\CHESS.APP) and the file it is made from; secret is the secret key file (.SEC) to sign with, or "". PkgFolderRows$(s, folder, prefix) gives those rows for every file in a folder, and PkgKindFolder$(kind, id) the folder a package of that kind keeps its files in. PkgSignStart(s, path, secret, detached) signs a package already built: into it, a job run the same way, or beside it (NAME.SIG) when detached, done at once. PkgKeygen(s, name, base) makes a key pair (base.KEY to give out, base.SEC to keep private), and PkgKeyInfo$ reads a key file's name and id. PkgIdValid and PkgVersionValid check an id and a version before building; PkgVersionCompare(a, b) says which of two versions is newer (-1, 0, or 1: "1.10.0" is newer than "1.9.2"); PkgKindName$ lists the kinds.</p>
|
||||
<h2>Web Requests and JSON</h2>
|
||||
<p>With http.bas in the project, a program asks web servers for pages, files, and web services' answers. HttpOpen(method, url) makes a request ("GET" to fetch, "POST" to send) and returns a handle; HttpClose frees it. Before starting it, HttpAddHeader adds a header, HttpSetBody gives a body to send with its type ("application/json", say), HttpSetBodyFile sends a file's bytes instead (a piece at a time, so a file of any size), HttpSaveTo writes the answer's body to a file instead of keeping it (with keepPart True, a file left part-way is finished rather than started again), and HttpSetTimeout sets how many seconds without progress mean the server is not answering (30 to start with). HttpStart starts it (False for an address that is not http://; there is no encryption), and HttpRunFor(h, milliseconds) runs it a little at a time, returning HTTP_BUSY until it is HTTP_DONE or HTTP_FAILED:</p>
|
||||
<pre><code>h = HttpOpen("GET", "http://example.com/news.txt")
|
||||
|
|
@ -6258,8 +6314,8 @@ Next i
|
|||
|
||||
' How wide a heading is in 24-pixel bold DejaVu Sans
|
||||
Print FontTextWidth("DejaVu Sans", 24, FONT_BOLD, "Chapter One")</code></pre>
|
||||
<p>FontFamilyFixed tells a fixed-pitch family (every character as wide as every other, for columns and code) from a proportional one. FontLineHeight is the height of one line of text and FontAscent the distance from the top of a line to the baseline the letters sit on. FontRescan reads the FONTS folder again after fonts were added or removed. FontLicence$(family, size, style) gives the notice and licence that go with a font: where it came from, its copyright notices, and its licence text (empty for the System font).</p>
|
||||
<p>A program can carry fonts of its own, so its text looks the same whatever fonts were installed. List the .DFN files in the project's Fonts (Project > Properties in the IDE): Make builds them into the program, and they are its fonts whenever it runs, from the IDE too. FontAddFile(path), FontAddData(label, bytes), and FontAddResources(file) add more while it runs. A program's fonts are its own -- other programs never see them -- and they go when it ends. Where a font it carries is of a family that is installed too, its sizes and styles come first and the installed family fills in the rest: a program that carries DejaVu Sans Bold at 36 pixels draws that size from its own font and every other size and style of DejaVu Sans from the FONTS folder. Fonts are made from TrueType, Type 1, and bitmap fonts with the SDK's mkfont, or copied from the FONTS folder; each .DFN carries its own licence.</p>
|
||||
<p>FontFamilyFixed tells a fixed-pitch family (every character as wide as every other, for columns and code) from a proportional one. FontLineHeight is the height of one line of text and FontAscent the distance from the top of a line to the baseline the letters sit on. FontRescan reads the FONTS folder again after fonts were added or removed. FontLicence$(family, size, style) gives the notice and license that go with a font: where it came from, its copyright notices, and its license text (empty for the System font).</p>
|
||||
<p>A program can carry fonts of its own, so its text looks the same whatever fonts were installed. List the .DFN files in the project's Fonts (Project > Properties in the IDE): Make builds them into the program, and they are its fonts whenever it runs, from the IDE too. FontAddFile(path), FontAddData(label, bytes), and FontAddResources(file) add more while it runs. A program's fonts are its own -- other programs never see them -- and they go when it ends. Where a font it carries is of a family that is installed too, its sizes and styles come first and the installed family fills in the rest: a program that carries DejaVu Sans Bold at 36 pixels draws that size from its own font and every other size and style of DejaVu Sans from the FONTS folder. Fonts are made from TrueType, Type 1, and bitmap fonts with the SDK's mkfont, or copied from the FONTS folder; each .DFN carries its own license.</p>
|
||||
<pre><code>' With font.bas added to the project: a title in a font the program carries
|
||||
If FontAddFile(App.Path + "\TITLE.DFN") Then
|
||||
lblTitle.FontName = "DejaVu Sans"
|
||||
|
|
@ -6279,7 +6335,7 @@ End Sub</code></pre>
|
|||
RichEdit1.SelBold = Not RichEdit1.SelBold
|
||||
End Sub</code></pre>
|
||||
<h2>Held Keys for Games</h2>
|
||||
<p>With game.bas in the project, GameKeyDown(keyCode) tells whether a key is being held down right now, so a game can move something for as long as a key is held instead of waiting for key presses. It returns True only while one of the program's own windows is active. Name the key with one of the GAMEKEY_ constants (the arrow keys, Shift, Ctrl, Alt, Space, Enter, Esc, and a few letters) or with its PC keyboard scan code (add &H80 for the grey keys between the typing keys and the number pad). A Timer polls it:</p>
|
||||
<p>With game.bas in the project, GameKeyDown(keyCode) tells whether a key is being held down right now, so a game can move something for as long as a key is held instead of waiting for key presses. It returns True only while one of the program's own windows is active. Name the key with one of the GAMEKEY_ constants (the arrow keys, Shift, Ctrl, Alt, Space, Enter, Esc, and a few letters) or with its PC keyboard scan code (add &H80 for the gray keys between the typing keys and the number pad). A Timer polls it:</p>
|
||||
<pre><code>Sub Timer1_Timer ()
|
||||
If GameKeyDown(GAMEKEY_LEFT) Then shipX = shipX - 2
|
||||
If GameKeyDown(GAMEKEY_RIGHT) Then shipX = shipX + 2
|
||||
|
|
@ -6378,13 +6434,18 @@ End Sub</code></pre>
|
|||
For f = 200 To 800 Step 50
|
||||
ok = NotesAdd(q, f, 15) ' a rising sweep, 15 ms a step
|
||||
Next f</code></pre>
|
||||
<p>A program can record sound from the sound card's microphone, line, or CD input into a WAV file, or into memory. SoundCaps("record") says whether the card can, and SoundCaps("recordsources") which inputs it has (the bit 2 ^ RECORD_MIC, RECORD_LINE, or RECORD_CD set for each). RecordStart(fileName, rate, bits, channels, inputSource) starts recording (0 for 22,050 Hz, 16-bit, mono) and returns True, or False with SoundError$ saying why; the card records at its nearest, which RecordRate(), RecordBits(), and RecordChannels() tell. While it records, RecordLength() is how long the recording is (milliseconds) and RecordLevel() the loudest sound since it was last asked (percent: a level meter); RecordLost() counts samples dropped because DVX was too busy. RecordStop() ends it and returns True when the file was all written; Recording() is True in between. With a file name of "", RecordStart records into memory instead: RecordRead$(maxBytes) takes up to maxBytes of what was recorded and not yet taken, as raw sound data in the recording's format (as SoundCreate and SoundStreamWrite take it), and RecordQueued() is how many bytes are waiting. Take them often, from a Timer: about two seconds are kept, and what does not fit is lost (RecordLost()). A program can show the sound as it comes, change it, or send it over the network. Most sound cards record or play, not both, so nothing plays while a program records, and one program records at a time. A program's recording ends when the program does.</p>
|
||||
<p>A program can record sound from the sound card's microphone, line, or CD input into a WAV file, or into memory. SoundCaps("record") says whether the card can, and SoundCaps("recordsources") which inputs it has (the bit 2 ^ RECORD_MIC, RECORD_LINE, or RECORD_CD set for each). RecordStart(fileName, rate, bits, channels, inputSource) starts recording (0 for 22,050 Hz, 16-bit, mono) and returns True, or False with SoundError$ saying why; the card records at its nearest, which RecordRate(), RecordBits(), and RecordChannels() tell. While it records, RecordLength() is how long the recording is (milliseconds) and RecordLevel() the loudest sound since it was last asked (percent: a level meter); RecordLost() counts samples dropped because DVX was too busy. RecordStop() ends it and returns True when the file was all written; Recording() is True in between. RecordCancel() ends it and throws it away instead: nothing of it is written (True; False when the program has no recording). RecordPause() pauses the recording and RecordResume() goes on with it: while it is paused nothing is recorded (the card stays taken, so nothing plays meanwhile), and after it the recording goes on from where it paused, with nothing between, RecordLength() leaving the paused time out. Both return True, or False when the program has no recording (SoundError$ says why); pausing a paused recording, or resuming one not paused, does nothing, and Recording() is True while it is paused. A file of that name already on the disk is replaced only when RecordStop ends the recording: a recording that cannot start, cannot all be written (the disk filled up), or is thrown away leaves it as it was. With a file name of "", RecordStart records into memory instead: RecordRead$(maxBytes) takes up to maxBytes of what was recorded and not yet taken, as raw sound data in the recording's format (as SoundCreate and SoundStreamWrite take it), and RecordQueued() is how many bytes are waiting. Take them often, from a Timer: about two seconds are kept, and what does not fit is lost (RecordLost()). A program can show the sound as it comes, change it, or send it over the network. Most sound cards record or play, not both, so nothing plays while a program records, and one program records at a time. A program's recording ends when the program does, complete as RecordStop leaves it. Running a DOS command (SHELL) ends it the same way, and Recording() is then False, but the recording stays the program's until RecordStop (True when its file was all written), RecordCancel (False, and SoundError$ says the recording had already ended: the file it completed stays), or the next RecordStart.</p>
|
||||
<pre><code>If RecordStart("NOTE.WAV", 0, 0, 0, RECORD_MIC) Then
|
||||
' ... a Timer shows RecordLength() and RecordLevel()
|
||||
ok = RecordStop()
|
||||
ok = RecordPause() ' nothing is recorded while it asks
|
||||
If MsgBox("Keep the recording?", vbYesNo + vbQuestion) = vbYes Then
|
||||
ok = RecordStop() ' NOTE.WAV is the new recording
|
||||
Else
|
||||
ok = RecordCancel() ' NOTE.WAV stays as it was
|
||||
End If
|
||||
End If</code></pre>
|
||||
<p>On a computer with an FM synthesizer chip (AdLib and most Sound Blasters), a program can play instruments of its own. FmInfo$(field) describes the chip: "description" (like "OPL3 FM synthesizer at 388h", "" when there is none), "voices", "free" (voices no program has), "stereo", and "owned" (one program has the whole chip). FmAlloc() takes one of its two-operator voices (0 when none is free), FmWrite(voice, register, value) sets one of the voice's registers (the FM_ constants: FM_MOD_CHAR, FM_CAR_LEVEL, FM_FNUM_LOW, FM_KEY_BLOCK with FM_KEY_ON, ...; True when it worked), and FmFree voice gives it back. A player of chip music files can take the whole chip with FmRawAcquire() (False while another program has it), set any register with FmRawWrite(register, value) (bank * FM_BANK_REGS + register; the second bank only on an OPL3) and give it back with FmRawRelease. A frequency number for FM_FNUM_LOW and FM_KEY_BLOCK is hertz * 2 ^ 20 / (FM_CHIP_HZ * 2 ^ block).</p>
|
||||
<p>On a wavetable sound card (a Gravis UltraSound, a Sound Blaster AWE32 or AWE64), a program can play recorded sounds on the card's own voices from the card's memory. WtInfo$(field) describes the card: "description" ("" when there is none), "voices", "free" (voices no program has), "memory", "freememory" (the largest free block), and "freetotal" (all free, in blocks maybe apart; bytes), "level" (how many centibels louder a voice at full volume is than the loudest recorded sound the card plays: 0 when it is the same or not known), and what the card does itself ("envelopes", "lfos", "filter", "effects", "8bit", "rom"; True or False as text). WtMemAlloc(bytes, bits) takes memory for samples of 8 or 16 bits (its address, -1 when there is no room), WtUpload(address, pcm, bits) copies 16-bit mono samples there (a binary string, two bytes a sample; True when it worked), and WtMemFree address gives it back. WtAlloc() takes a voice (0 when none is free); WtStart(voice, address, startFrame, endFrame, loopStart, loopEnd, loopMode, bits, pitch, attenuation, pan) plays a sample on it from startFrame (0: its first; loopMode 0 plays once, 1 loops, 3 loops until WtRelease; pitch in cents, 0 for 44,100 samples a second and 1200 an octave higher; attenuation in centibels, 0 loudest and 60 half as loud; pan -100 to 100); on a card with a General MIDI sample ROM (WtInfo$("rom")) the address may be WT_ADDR_ROM plus the bytes from the ROM's start. WtSetPitch, WtSetAttenuation, and WtSetPan change a playing voice, WtStop silences it, WtActive(voice) is True while it sounds, and WtFree voice gives it back. WtShape(voice, field, value) shapes the voice's notes as a SoundFont instrument does, one value by name, where the card can (WtInfo$ "envelopes", "lfos", "filter", "effects"): the volume envelope ("voldelay", "volattack", "volhold", "voldecay", "volsustain", "volrelease"), the modulation envelope ("moddelay" to "modrelease", "modenvpitch", "modenvfilter"), the modulation and vibrato LFOs ("modlfodelay", "modlfofreq", "modlfopitch", "modlfofilter", "modlfovolume", "viblfodelay", "viblfofreq", "viblfopitch"), the filter ("filterfc", "filterq"), and the effects ("reverb", "chorus"), in the units sound.bas lists. A value is kept for the voice's next WtStart; the filter, the effects, and the LFO depths also change a note that is sounding. Everything a program took is given back when it ends.</p>
|
||||
<p>On a wavetable sound card (a Gravis UltraSound, a Sound Blaster AWE32 or AWE64), a program can play recorded sounds on the card's own voices from the card's memory. WtInfo$(field) describes the card: "description" ("" when there is none), "voices", "free" (voices no program has), "memory", "freememory" (the largest free block), "freetotal" (all free, in blocks maybe apart; bytes), "level" (how many centibels louder a voice at full volume is than the loudest recorded sound the card plays: 0 when it is the same or not known), and what the card does itself ("envelopes", "lfos", "filter", "effects", "8bit", "rom"; True or False as text). WtMemAlloc(bytes, bits) takes memory for samples of 8 or 16 bits (its address, -1 when there is no room), WtUpload(address, pcm, bits) copies 16-bit mono samples there (a binary string, two bytes a sample; True when it worked), and WtMemFree address gives it back. WtAlloc() takes a voice (0 when none is free); WtStart(voice, address, startFrame, endFrame, loopStart, loopEnd, loopMode, bits, pitch, attenuation, pan) plays a sample on it from startFrame (0: its first; loopMode 0 plays once, 1 loops, 3 loops until WtRelease; pitch in cents, 0 for 44,100 samples a second and 1200 an octave higher; attenuation in centibels, 0 loudest and 60 half as loud; pan -100 to 100); on a card with a General MIDI sample ROM (WtInfo$("rom")) the address may be WT_ADDR_ROM plus the bytes from the ROM's start. WtSetPitch, WtSetAttenuation, and WtSetPan change a playing voice, WtStop silences it, WtActive(voice) is True while it sounds, and WtFree voice gives it back. WtShape(voice, field, value) shapes the voice's notes as a SoundFont instrument does, one value by name, where the card can (WtInfo$ "envelopes", "lfos", "filter", "effects"): the volume envelope ("voldelay", "volattack", "volhold", "voldecay", "volsustain", "volrelease"), the modulation envelope ("moddelay" to "modrelease", "modenvpitch", "modenvfilter"), the modulation and vibrato LFOs ("modlfodelay", "modlfofreq", "modlfopitch", "modlfofilter", "modlfovolume", "viblfodelay", "viblfofreq", "viblfopitch"), the filter ("filterfc", "filterq"), and the effects ("reverb", "chorus"), in the units sound.bas lists. A value is kept for the voice's next WtStart; the filter, the effects, and the LFO depths also change a note that is sounding. Everything a program took is given back when it ends.</p>
|
||||
<p>sound.bas also changes DVX's own sound settings, as the Control Panel's Sounds page does. DVX plays a sound for each of SoundEventCount() events, numbered from 0: SoundEventLabel$(eventIdx) names one ("Start DVX", "Error", ...) and SoundEventKey$(eventIdx) gives its key in DVX.INI. With a settings handle from prefs.bas (PrefsLoad(PrefsDvxIni$())), SoundEventFile$(handle, eventIdx) is the event's sound file ("" for none) and SoundSetEventFile handle, eventIdx, fileName changes it; after the program saves the file, SoundEventsReload makes DVX play the new sounds. SoundTestFile(fileName) plays a file the way DVX plays its event sounds (0 when it cannot, and SoundError$() says why), and SoundFolder$() is the folder of DVX's own sounds. SoundMasterVolume() and SoundSetMasterVolume percent are the volume of all sound from every program. SoundDriverCount() reads the list of sound drivers and SoundDriverName$(index) names each; SoundDriverAuto$() is the setting that means "find the best one". SoundMidiCount() and SoundMidiLabel$(index) list where MIDI music can play, SoundMidiInCount() and SoundMidiInLabel$(index) where MIDI input can come from, and SoundModulesCount() and SoundModulesLabel$(index) where music modules can play. SoundSettingDriver$(handle), SoundSettingMidi(handle), SoundSettingModules(handle), and SoundSettingVolume(handle) read the sound driver, MIDI choice, modules choice, and master volume from the settings, and SoundSettingsStore handle, driver, midi, modules, volume stores them (a new driver or MIDI choice takes effect when DVX next starts, a modules choice with the next music); SoundSettingMidiIn(handle) and SoundSettingMidiInStore handle, midiIn read and store the MIDI input choice (it takes effect when DVX next starts).</p>
|
||||
<pre><code>Dim ini As Long
|
||||
Dim i As Long
|
||||
|
|
@ -6433,7 +6494,7 @@ End Sub</code></pre>
|
|||
<p>MusicGetVolume(music) gives a music's volume in percent. MusicInfo$(music, field) tells about it, by name in any case: "title" (a module's own title, or the name a MIDI file gives itself; "" for a sound file), "output" (where it plays, for people), "kind" ("module", "midi", "live", or "sound"), "where" ("stream", "mpu401", "fm", "software", "wave", or "softwave"; "wave" is a wavetable card's voices, for a module too; "" before it first plays), and "paused" and "looping" (True or False as text; VAL gives the value).</p>
|
||||
<p>A program that sends MIDI itself (system exclusive messages, a sequencer of its own) can have the MIDI port, one program at a time, when the settings send MIDI music to the MIDI port. MidiPortInfo$(field) describes it: "description" ("" when there is none), "present", "owned" (a program has it), "input" (it brings MIDI in), and "inputowned" (a program reads what comes in). MidiAcquire() takes the port (False when another program has it or there is none), MidiPut(byteValue) sends one byte (False when the port could not take it yet: send it again), and MidiRelease gives the port back.</p>
|
||||
<p>When the settings take MIDI input from the MIDI port (Control Panel, Sounds, MIDI in), a program can read what a MIDI keyboard or another instrument plays. MidiInOpen() starts reading (False when there is no MIDI input or another program reads it; SoundError$() says which) and MidiInClose stops; a program's reading stops when it ends. MidiInMessage() gives the next message that came, or MIDI_NONE (-1) when none waits. A message is packed into one number: the status is midiMsg AND 255 (its kind, midiMsg AND MIDI_KIND_MASK, is MIDI_NOTE_ON, MIDI_NOTE_OFF, MIDI_CONTROL, MIDI_PROGRAM, MIDI_PITCH_BEND, MIDI_KEY_PRESSURE, or MIDI_CHANNEL_PRESSURE, and its channel, numbered as MusicNoteOn numbers them, is (midiMsg AND MIDI_CHANNEL_MASK) + 1), the first data byte (the note) is (midiMsg \ 256) AND 255, and the second (the velocity) (midiMsg \ 65536) AND 255. A note on with a velocity of 0 is a note off too. MidiInTime() is when the message MidiInMessage gave last came and MidiInClock() the time now, both in milliseconds since MidiInOpen; MidiInLost() counts bytes lost because the program read too late. MusicMidiSend music, midiMsg plays a message as it came on a live music (MIDI thru), so what is played is heard.</p>
|
||||
<p>A MIDI recording keeps messages with their times and saves them as a MIDI file that MusicLoad plays. MidiRecordNew() returns a recording number (0 when there is no room; MusicError$() says why), MidiRecordAdd recording, milliseconds, midiMsg adds a message (MidiInTime() is the time to give, when the recording started with MidiInOpen), MidiRecordCount(recording) and MidiRecordLength(recording) tell how many messages it has and when the last came, MidiRecordSave(recording, fileName) writes the file (False when it could not be written; MusicError$() says why; a note still held at the end is let go), and MidiRecordFree recording frees it. A program's recordings are freed when it ends. The Sound Recorder records a MIDI keyboard this way:</p>
|
||||
<p>A MIDI recording keeps messages with their times and saves them as a MIDI file that MusicLoad plays. MidiRecordNew() returns a recording number (0 when there is no room; MusicError$() says why), MidiRecordAdd recording, milliseconds, midiMsg adds a message (MidiInTime() is the time to give, when the recording started with MidiInOpen), MidiRecordCount(recording) and MidiRecordLength(recording) tell how many messages it has and when the last came, MidiRecordSave(recording, fileName) writes the file (False when it could not be written; MusicError$() says why, and a file of that name already on the disk stays as it was; a note still held at the end is let go), and MidiRecordFree recording frees it (freed without MidiRecordSave, a recording writes nothing: that is how a take the user does not keep is thrown away). MidiRecordPause recording, milliseconds pauses a recording and MidiRecordResume recording, milliseconds goes on with it (MidiInClock() is the time to give): what comes in between is not kept, what comes later is moved earlier by the time paused, so the recording goes on with no gap, and the notes held when it pauses are let go there (a sustain pedal down is let up). MidiRecordTime(recording, milliseconds) is how long the recording has been going at that time, the time paused left out (a clock to show while recording). A program's recordings are freed when it ends. The Sound Recorder records a MIDI keyboard this way:</p>
|
||||
<pre><code>Dim Shared take As Long
|
||||
Dim Shared keys As Long
|
||||
|
||||
|
|
@ -6637,10 +6698,10 @@ Sub UserControl_KeyPress (KeyAscii As Integer)
|
|||
End If
|
||||
End Sub</code></pre>
|
||||
<p>Selections a program leaves open are freed when it ends.</p>
|
||||
<p>An icon view drawn with listhelp.bas looks and behaves like Program Manager's: the same cells for large icons, small icons, and the list, the same frame and scroll bar, a large icon's name on two lines, and the same rules for the keys, dragging and dropping. The grid functions take the view mode (LISTICON_VIEW_LARGE, LISTICON_VIEW_SMALL, or LISTICON_VIEW_LIST), the size of a character (TextWidth("W") and TextHeight("W")), the size of the whole view, how many items it shows, and rowsTaken: LISTICON_BY_ORDER when the items fill the grid in order, else how many rows items placed in cells of their own take. Draw the view's frame with DrawBevel (LISTICON_FRAME wide; with the face -1 after the items, so a row cut off at the bottom stops at the frame) and its scroll bar with DrawScrollBar as a control's bar (its control argument True); the grid leaves room for it.</p>
|
||||
<p>An icon view drawn with listhelp.bas looks and behaves like Program Manager's: the same cells for large icons, small icons, and the list, the same frame and scroll bar, a large icon's name on two lines, and the same rules for the keys, dragging, and dropping. The grid functions take the view mode (LISTICON_VIEW_LARGE, LISTICON_VIEW_SMALL, or LISTICON_VIEW_LIST), the size of a character (TextWidth("W") and TextHeight("W")), the size of the whole view, how many items it shows, and rowsTaken: LISTICON_BY_ORDER when the items fill the grid in order, else how many rows items placed in cells of their own take. Draw the view's frame with DrawBevel (LISTICON_FRAME wide; with the face -1 after the items, so a row cut off at the bottom stops at the frame) and its scroll bar with DrawScrollBar as a control's bar (its control argument True); the grid leaves room for it.</p>
|
||||
<pre> Function Description
|
||||
-------- -----------
|
||||
ListIconMetric(mode, metric, cw, ch, w, h, count, rowsTaken) One value of the grid: a cell's size (LISTICON_CELL_W, LISTICON_CELL_H), where its picture goes and how big it is (LISTICON_PICTURE_X, LISTICON_PICTURE_Y, LISTICON_PICTURE_SIZE), where its name goes and how many characters it shows (LISTICON_TEXT_X, LISTICON_TEXT_Y, LISTICON_NAME_CHARS; a large icon's two lines are each centred in the cell), the list's detail column (LISTICON_DETAIL_X, 0 in the other views); the inside of the frame less the scroll bar (LISTICON_INNER_X, LISTICON_INNER_Y, LISTICON_INNER_W, LISTICON_INNER_H), the columns, the rows shown whole and in all (LISTICON_COLUMNS, LISTICON_ROWS_SHOWN, LISTICON_ROWS), the largest top row (LISTICON_TOP_ROW_MAX), True when the scroll bar is needed (LISTICON_SCROLLBAR), where the text of an empty view goes (LISTICON_EMPTY_X, LISTICON_EMPTY_Y), the frame's width (LISTICON_FRAME), and the rows a wheel notch scrolls (LISTICON_WHEEL_ROWS).
|
||||
ListIconMetric(mode, metric, cw, ch, w, h, count, rowsTaken) One value of the grid: a cell's size (LISTICON_CELL_W, LISTICON_CELL_H), where its picture goes and how big it is (LISTICON_PICTURE_X, LISTICON_PICTURE_Y, LISTICON_PICTURE_SIZE), where its name goes and how many characters it shows (LISTICON_TEXT_X, LISTICON_TEXT_Y, LISTICON_NAME_CHARS; a large icon's two lines are each centered in the cell), the list's detail column (LISTICON_DETAIL_X, 0 in the other views); the inside of the frame less the scroll bar (LISTICON_INNER_X, LISTICON_INNER_Y, LISTICON_INNER_W, LISTICON_INNER_H), the columns, the rows shown whole and in all (LISTICON_COLUMNS, LISTICON_ROWS_SHOWN, LISTICON_ROWS), the largest top row (LISTICON_TOP_ROW_MAX), True when the scroll bar is needed (LISTICON_SCROLLBAR), where the text of an empty view goes (LISTICON_EMPTY_X, LISTICON_EMPTY_Y), the frame's width (LISTICON_FRAME), and the rows a wheel notch scrolls (LISTICON_WHEEL_ROWS).
|
||||
ListIconCellAt(mode, cw, ch, w, h, count, rowsTaken, topRow, x, y) The cell under x, y with the view scrolled to topRow, numbered row * columns + column; -1 outside the grid.
|
||||
ListIconLabel$(name, maxChars, lineNo) Line 1 or 2 of a large icon's name, maxChars characters a line (LISTICON_NAME_CHARS): the first line ends at the last blank that fits, else it is cut; the second is the rest, cut. "" for a line the name does not need.
|
||||
ListIconNavigate(keyCode, current, cells, columns, pageRows) The item the arrow keys, Home, End, PgUp, or PgDn move to when the items stand in cells of their own, gaps allowed: cells holds each item's column and row, all separated by commas ("0,0,2,0,1,1"). -1 for another key or when no item is that way.
|
||||
|
|
@ -6751,7 +6812,7 @@ End Sub</code></pre>
|
|||
lstFiles.MaxHeight = SizePercent(50)</code></pre>
|
||||
<h2>Compiling and Debugging Programs</h2>
|
||||
<p>With compiler.bas in the project, a program compiles BASIC programs -- what a development tool written in BASIC needs. A source set holds the files of one program: CompSourceFromProject(src, dbpPath) reads a whole project (.dbp) from disk, or CompSourceAdd(src, path, text, kind) adds files one at a time, in the order a project compiles: modules, then class modules, then UserControls, then forms (COMP_KIND_AUTO tells them apart by the file name; a form's whole .frm text is added, and the code after its layout is compiled; a UserControl's whole .ctl text, its header and its code). CompCompile(src, optionExplicit, validate) gives a compiled module, or 0 with CompError$() saying what is wrong and CompErrorFile$() / CompErrorFileLine() where. With validate True, Label1.Captoin and other misspelled control members, and controls of an unknown type, are found while compiling instead of when the line runs (the set's own UserControls are known types).</p>
|
||||
<p>Line numbers of compiled programs (errors, breakpoints, the line a program is paused on) count through all the files of the source set. CompMapFile$(src, line) and CompMapLine(src, line) give the file and the line in it; CompConcatLine(src, path, fileLine) goes the other way. CompSourceFiles$ lists the files in compile order. CompBuildApp(module, src, outPath, release) builds an .app the way the IDE's Make Executable does, with the project's name, icon, and help file, its forms, and its UserControls. For a control project (its Type setting is "Control") it builds a control file instead (outPath NAME.wgt), the way the IDE's Make Control does: the project's UserControls with their toolbox pictures and names, there for every program once the file is copied into DVX's WIDGETS folder (DVX loads it when it starts). CompProcList$(text) lists the SUB and FUNCTION blocks of source text with their first and last lines (also for code that does not compile yet), CompIsIdent checks a name and CompKeyword$ lists the language's keywords, CompKeywordClass the kind of each (COMP_KW_OTHER, COMP_KW_TYPE, or COMP_KW_LITERAL), and CompKeywordReserved whether a program may also use it as a name of its own.</p>
|
||||
<p>Line numbers of compiled programs (errors, breakpoints, the line a program is paused on) count through all the files of the source set. CompMapFile$(src, line) and CompMapLine(src, line) give the file and the line in it; CompConcatLine(src, path, fileLine) goes the other way. CompSourceFiles$ lists the files in compile order. CompBuildApp(module, src, outPath, release) builds an .app the way the IDE's Make Executable does, with the project's name, icon, and help file, its forms, and its UserControls. For a control project (its Type setting is "Control") it builds a control file instead (outPath NAME.wgt), the way the IDE's Make Control does: the project's UserControls with their toolbox pictures and names, there for every program once the file is copied into DVX's WIDGETS folder (DVX loads it when it starts). CompProcList$(text) lists the SUB and FUNCTION blocks of source text with their first and last lines (also for code that does not compile yet), CompIsIdent checks a name, and CompKeyword$ lists the language's keywords, CompKeywordClass the kind of each (COMP_KW_OTHER, COMP_KW_TYPE, or COMP_KW_LITERAL), and CompKeywordReserved whether a program may also use it as a name of its own.</p>
|
||||
<p>Project files: ProjOpen(dbpPath) opens a project file (.dbp) and ProjNew(name, folder) starts a new one; ProjSave writes it and ProjClose frees it. ProjFileCount, ProjFile$ (the name as the project lists it), ProjFilePath$ (the full path), ProjFileKind (COMP_KIND_MODULE, COMP_KIND_FORM, COMP_KIND_CLASS, or COMP_KIND_CONTROL), and ProjFileFind list its files; ProjAddFile, ProjRemoveFile, and ProjRenameFile (on disk and in the project together, saved at once) change the list. ProjGet$ and ProjSet read and set its settings by their names in the file: Name, Type ("Control" for a control project, empty for a program), Author, Publisher, Version, Copyright, Description, Icon, HelpFile, CommandArgs, StartupForm, OptionExplicit, and MultiInstance (the last two "true" or "false"). This is the project model the DVX BASIC IDE uses.</p>
|
||||
<p>A UserControl's header (the Begin UserControl block at the top of its .ctl file) is read and changed the way the IDE's Properties window does it, the rest of the text left as it is: ProjCtlKeys$() lists the keys in the window's order with the kind of value each takes (Name, Width, Height, CanGetFocus, BackColor, ToolboxIcon, Description, DefaultEvent; the kinds Name, Integer, Boolean, Color, and Text), ProjCtlHeader$(text, key) reads one (its default when the header leaves it out), ProjCtlSetHeader$(text, key, value) gives the text with one set (an empty value removes it; Name renames the control), and ProjCtlNew$(name) the text of a new UserControl, as File > New UserControl makes it.</p>
|
||||
<p>With debug.bas too, a program runs a compiled module as a child program inside itself: RunCreate(module, src, appDir, args) prepares it, RunStart(run, startupForm, breakOnStart) loads its forms, and RunPoll(run, ms), called from a Timer, runs it for at most ms milliseconds at a time and returns what it is doing: RUN_RUNNING, RUN_EVENTS (waiting for events on its forms), RUN_PAUSED, RUN_ENDED, or RUN_ERROR (RunError$ and RunErrorLine tell why and where). RunOutput$ collects what it PRINTs; INPUT asks with an input box. RunStop ends it and RunFree forgets it.</p>
|
||||
|
|
@ -6807,8 +6868,8 @@ Sub Canvas_DesignPropertyChanged(CtrlName As String, PropertyName As String)
|
|||
End Sub</code></pre>
|
||||
<p>A .frm file can also be worked on as data, the way the DVX BASIC IDE does it, without showing it. FrmOpen(text$), FrmOpenFile(path$), or FrmNew(name$) gives a handle to a form model (0 when the text is not a form); FrmText$ writes it back as .frm text in the form the IDE saves and FrmSave writes it to a file; FrmFree frees it (a program's open handles are freed when it ends). FrmGet$ and FrmSet read and change the form's properties (Caption, Width, AutoSize, Layout, Icon, Tag ...; Name renames the form), FrmGetCode$ and FrmSetCode its code. The controls are numbered from 0 in file order, each one followed by the controls inside it: FrmCtlCount, FrmCtlFind, FrmCtlName$, FrmCtlType$, FrmCtlIndex (its control array index, -1 when it is not in an array), and FrmCtlParent (the container, -1 for the form) describe them; FrmCtlGet$ and FrmCtlSet read and set any property as text (Name renames the control alone, as Visual Basic does -- an element of a control array leaves it, keeping its Index, and the other elements keep the name -- and the controls inside it follow; Index makes it an array member -- "" none, 0 to 32767 one no other control of its name has; a control whose name others share keeps one, and gets none while one of them has none -- and FrmCtlIndexError$ says why one is refused, "" when it is not; an OptionButton set to True clears the others in its container), FrmCtlJoin renames a control the name of other controls of its type, an element of their control array (a lone control of that name becomes element 0, it takes the next Index; an element of another array leaves that one), as the Visual Basic designer does on such a rename, FrmCtlRemoveProp takes a set one out, and FrmCtlPropCount / FrmCtlPropName$ list the ones that were set. FrmCtlAdd adds a control (its name "" gives the next free one, Command1, Label2 ...) as the last control of a container (-1: the form), FrmCtlRemove removes one with what is inside it, FrmCtlMove puts one before another of the same container, and FrmCtlReparent into another container. FrmCtlText$ gives a control with what is inside it as .frm text, what a designer puts on the Clipboard to copy it, and FrmCtlPaste puts such text into a container: a name that is already taken is replaced by a free one. The menu items are numbered from 0 in menu order with a Level (0 for a menu on the menu bar or a popup menu, 1 for its items, 2 and more for submenus): FrmMenuCount, FrmMenuGet$ / FrmMenuSet (Name, Index -- -1 for an item in no menu control array --, Caption, Shortcut, ShortcutText, Checked, RadioCheck, Enabled, Visible, Tag, Level; Name refuses a name in use, but an item with an Index joins the menu control array of its name when no element has that Index), FrmMenuAdd, FrmMenuRemove (with the items under it), FrmMenuMove (past the previous or next item of its level), and FrmMenuIndent (one level in or out, with the items under it). Only what was set is written: a property a control has by default is left out of the file.</p>
|
||||
<p>FormText$(formName$) writes a loaded form as it is now as .frm text -- one shown with LoadFormText, made with CreateForm and CreateControl, or one of the program's own: its properties, its controls in their containers with each property that differs from a new control of that type, and its menus (a form loaded this way has no code). A designer that keeps its form live saves it with FormText$, and FrmOpen(FormText$(...)) reads it as a model.</p>
|
||||
<p>compiler.bas reads source text as the compiler does, for a code editor: CompTokens$(source) lists its tokens (line, column, length, kind, and text, the kind one of Keyword, Identifier, String, Number, Date, Symbol, Comment, and Error); CompInCode(source, position) tells whether a character is code rather than inside a string or a comment; CompRenameInCode$(source, oldName, newName, codeOnly) renames a form, control, or menu item where code refers to it (Command1.Caption, Command1_Click), leaving strings and comments alone with codeOnly; CompWithEvents$ lists the WithEvents variables a file declares and CompClassEvents$ the Events of a class module, for the Object and Event lists; CompHelpTopic$(word) and CompHelpCtrlTopic$(typeName) are the help topics F1 opens (HelpViewTopic on dvxbasic.hlp beside the IDE).</p>
|
||||
<p>A code editor is a TextArea: SetSyntaxMode "bas" colours BASIC as the IDE does (SetSyntaxColor changes the colours), SetLineMarker marks breakpoints and the current line, GutterClick reports clicks on the line numbers, SelStart / SelLength / SelText and Cut, Copy, Paste, SelectAll, and Undo give the Edit menu, FindNext / ReplaceSelection / ReplaceAll find and replace, and LineCount / GetLine / CursorLine / CursorCol read the text (see TextArea).</p>
|
||||
<p>compiler.bas reads source text as the compiler does, for a code editor: CompTokens$(source) lists its tokens (line, column, length, kind, and text, the kind one of Keyword, Identifier, String, Number, Date, Symbol, Comment, and Error); CompInCode(source, position) tells whether a character is code rather than inside a string or a comment; CompRenameInCode$(source, oldName, newName, codeOnly) renames a form, control, or menu item where code refers to it (Command1.Caption, Command1_Click), leaving strings and comments alone with codeOnly; CompWithEvents$ lists the WithEvents variables a file declares and CompClassEvents$ the Events of a class module or a form's code, for the Object and Event lists; CompHelpTopic$(word) and CompHelpCtrlTopic$(typeName) are the help topics F1 opens (HelpViewTopic on dvxbasic.hlp beside the IDE).</p>
|
||||
<p>A code editor is a TextArea: SetSyntaxMode "bas" colors BASIC as the IDE does (SetSyntaxColor changes the colors), SetLineMarker marks breakpoints and the current line, GutterClick reports clicks on the line numbers, SelStart / SelLength / SelText and Cut, Copy, Paste, SelectAll, and Undo give the Edit menu, FindNext / ReplaceSelection / ReplaceAll find and replace, and LineCount / GetLine / CursorLine / CursorCol read the text (see TextArea).</p>
|
||||
<pre><code>' designer.bas in the project: put a copy of the first control of a
|
||||
' .frm file into a Frame of the same form and save it
|
||||
Sub CopyIntoFrame(path As String)
|
||||
|
|
@ -6955,7 +7016,7 @@ End Sub</code></pre>
|
|||
</div>
|
||||
<div class="topic" id="ctrl.drawing">
|
||||
<h1>Drawing on Forms and PictureBoxes</h1>
|
||||
<p>Forms and PictureBoxes have Visual Basic's drawing methods. They draw with the same code as the QBasic graphics statements (see Console and Graphics in the language reference), in pixels unless ScaleMode or Scale says otherwise, with colours as Visual Basic RGB values, &HBBGGRR (RGB(255, 0, 0) or &HFF is red). A PictureBox draws on its picture; a form gets a drawing area the size of its window the first time it draws, placed with its controls like a PictureBox (so draw on a form that has no controls, or use a PictureBox beside them).</p>
|
||||
<p>Forms and PictureBoxes have Visual Basic's drawing methods. They draw with the same code as the QBasic graphics statements (see Console and Graphics in the language reference), in pixels unless ScaleMode or Scale says otherwise, with colors as Visual Basic RGB values, &HBBGGRR (RGB(255, 0, 0) or &HFF is red). A PictureBox draws on its picture; a form gets a drawing area the size of its window the first time it draws, placed with its controls like a PictureBox (so draw on a form that has no controls, or use a PictureBox beside them).</p>
|
||||
<p>Drawings stay until they are drawn over or cleared. In a form's own code the form's drawing methods and properties need no object, as in Visual Basic: Cls, Line, Circle, PSet, Scale, Point, TextWidth, ScaleWidth, and the rest are the form's own (Line and Me.Line are the same there). Print without an object is the exception: it stays the PRINT statement, so write Me.Print to print on the form. In a module's code Line, Circle, PSet, and Cls without an object are the QBasic graphics statements (they draw on the program's screen).</p>
|
||||
<p>Through a variable As Object (or As Form for a form, As Control or As PictureBox for a PictureBox) the drawing methods work on whatever form, PictureBox, or Printer it holds: o.Line (0, 0)-(10, 10), o.Circle (5, 5), 3, o.PSet Step(1, 1), and o.Print "Hi"; are their drawing statements, as in Visual Basic. A class can have Public procedures of these names too; on an object of a class the statement is a call of the class's own procedure, with comma-separated arguments (o.Line 1, 2, 3). Through As Object the way the arguments are written tells which is meant: after Line, Circle, PSet, or Scale, arguments that start with Step or with a point in parentheses (for Line also -(x, y)), or no arguments at all, are the drawing statement; any other arguments are a call of the object's own method (write Call o.Line((a + b), c) for a call whose first argument is in parentheses). Print through As Object is always the drawing statement. A drawing statement that reaches an object of a class calls its procedure of that name with the values the statement packs (a class without one raises error 438), so give such an object comma-separated arguments.</p>
|
||||
<h2>Drawing Methods</h2>
|
||||
|
|
@ -6966,7 +7027,7 @@ End Sub</code></pre>
|
|||
Line [[Step](x1, y1)]-[Step](x2, y2) [, color] [, B | BF] Draws a line, a box (B), or a filled box (BF). A box without F is filled with FillColor when FillStyle is 0.
|
||||
Circle [Step](x, y), radius [, color [, start [, end [, aspect]]]] Draws a circle, ellipse, or arc, filled with FillColor when FillStyle is 0 (full circles).
|
||||
DrawFocusRect x, y, width, height [, color] Draws the dotted rectangle DVX shows around the control that has the keyboard focus (every other pixel of its edge), for things a program draws itself, such as the focused link of a help topic. A negative width or height counts from the other edge.
|
||||
Point(x, y) The colour of a pixel, -1 outside the picture. With fewer than 16 million colours on the screen it is the colour the screen shows: black, white, and full colours such as RGB(255, 0, 0) read back exactly, others may differ slightly.
|
||||
Point(x, y) The color of a pixel, -1 outside the picture. With fewer than 16 million colors on the screen it is the color the screen shows: black, white, and full colors such as RGB(255, 0, 0) read back exactly, others may differ slightly.
|
||||
Print items Writes text at CurrentX, CurrentY in ForeColor, in the object's font FontScale times as large, with PRINT's separators (; and ,), SPC, and TAB (counted in the font's character width); ends by moving to the next line unless the last item is followed by ; or ,. An array or a TYPE record raises error 13 (Type mismatch), which ON ERROR can trap, as PRINT's does.
|
||||
PaintPicture picture, x, y [, width, height [, srcX, srcY, srcWidth, srcHeight [, opcode]]] Copies a picture, stretched to width x height: an image file (BMP, PNG, JPEG, or GIF), a picture from LOADPICTURE, or a PictureBox given by its name as a string or by a Control variable. opcode combines each pixel with the one already there (see Raster Operations).
|
||||
Scale [(x1, y1)-(x2, y2)] Gives the drawing coordinates of its own: (x1, y1) is the top-left corner and (x2, y2) the bottom-right one (y2 below y1 makes y go up). Scale alone goes back to pixels.
|
||||
|
|
@ -6975,17 +7036,17 @@ End Sub</code></pre>
|
|||
TextWidth(text) Width of the text in the object's font, in the scale's units, at the FontScale size.
|
||||
TextHeight(text) Height of a line of text in the object's font, in the scale's units, at the FontScale size.</pre>
|
||||
<h2>Drawing the DVX Look</h2>
|
||||
<p>These methods draw the parts DVX's own controls are made of, in the colours of the current theme, for controls a program draws itself (a PictureBox that acts as a list or a toolbar). Coordinates and lengths are in the scale's units; colours are RGB values.</p>
|
||||
<p>These methods draw the parts DVX's own controls are made of, in the colors of the current theme, for controls a program draws itself (a PictureBox that acts as a list or a toolbar). Coordinates and lengths are in the scale's units; colors are RGB values.</p>
|
||||
<pre> Method Description
|
||||
------ -----------
|
||||
DrawBevel x, y, width, height [, sunken [, face [, border]]] A raised box like a window or button edge, or with sunken True a sunken one like a text box's. face is the fill colour (the theme's face colour when left out; -1 leaves the inside as it is, to frame what is already drawn); border is the edge width in pixels (2).
|
||||
DrawBevel x, y, width, height [, sunken [, face [, border]]] A raised box like a window or button edge, or with sunken True a sunken one like a text box's. face is the fill color (the theme's face color when left out; -1 leaves the inside as it is, to frame what is already drawn); border is the edge width in pixels (2).
|
||||
DrawButtonFace x, y, width, height [, pressed [, face]] A button face, up or with pressed True pushed down.
|
||||
DrawArrow x, y, size, direction [, color] A solid triangle centred on x, y, size pixel rows tall, pointing dvxArrowUp (0), dvxArrowDown (1), dvxArrowLeft (2), or dvxArrowRight (3), in ForeColor unless a colour is given.
|
||||
DrawArrow x, y, size, direction [, color] A solid triangle centered on x, y, size pixel rows tall, pointing dvxArrowUp (0), dvxArrowDown (1), dvxArrowLeft (2), or dvxArrowRight (3), in ForeColor unless a color is given.
|
||||
DrawScrollBar x, y, length, position, visible, total [, horizontal [, control]] A scroll bar with its arrows and its thumb, for a list of total rows of which visible are shown from row position, with its top-left corner at x, y. It stands upright (16 pixels wide, length tall, arrows at the top and bottom) unless horizontal is True: then it lies across (length wide, 16 pixels tall, arrows at the left and right ends). With control True it is the narrower bar of a control such as ListBox (14 pixels).
|
||||
DrawScrollArrow x, y, size, direction One arrow button of a scroll bar, as at the ends of DrawScrollBar's bars: a square button size wide and tall (size in the scale's horizontal units) with its top-left corner at x, y and an arrow pointing dvxArrowUp, dvxArrowDown, dvxArrowLeft, or dvxArrowRight, in the theme's scroll bar colours.
|
||||
DrawScrollArrow x, y, size, direction One arrow button of a scroll bar, as at the ends of DrawScrollBar's bars: a square button size wide and tall (size in the scale's horizontal units) with its top-left corner at x, y and an arrow pointing dvxArrowUp, dvxArrowDown, dvxArrowLeft, or dvxArrowRight, in the theme's scroll bar colors.
|
||||
ScrollBarClick(length, offset, position, visible, total [, horizontal [, control]]) The new position after a click on a scroll bar DrawScrollBar drew with the same length, rows, direction, and kind: offset is how far the click is from the top of the bar, or from its left end when horizontal is True. The arrows move one row, the trough a page, the thumb leaves it as it is. Needs no drawing. As on every scroll bar, holding the left button down on an arrow or the trough of a bar DrawScrollBar drew repeats the MouseDown event: once after a fifth of a second, then twenty times a second, each time once the program has drawn the bar again (in MouseDown, or in Paint after Refresh), while the pointer stays on the object, until the button is let go or, in the trough, the thumb reaches the pointer.
|
||||
ScrollBarsNeeded(contentWidth, contentHeight, areaWidth, areaHeight) Which scroll bars content that big needs in an area that big, as DVX's controls decide it: vbSBNone (0), vbHorizontal (1), vbVertical (2), or vbBoth (3). A vertical bar narrows the area and may make a horizontal one needed, and the other way round. The sizes are in the object's scale. Needs no drawing.
|
||||
PrintAccel text [, enabled] Prints a caption in the object's font at CurrentX, CurrentY with the letter after & underlined (&& prints one &); enabled False gives the greyed, embossed look of a disabled control. CurrentX moves past the text.
|
||||
PrintAccel text [, enabled] Prints a caption in the object's font at CurrentX, CurrentY with the letter after & underlined (&& prints one &); enabled False gives the grayed, embossed look of a disabled control. CurrentX moves past the text.
|
||||
TextWidthAccel(text) Width of a caption without its & signs in the object's font, in the scale's units.
|
||||
AccelKey(text) The access key of a caption in lower case ("f" for "&File"), "" when it has none.</pre>
|
||||
<pre><code>Sub Picture1_Paint()
|
||||
|
|
@ -7004,7 +7065,7 @@ Sub Picture1_MouseDown(Button As Integer, X As Integer, Y As Integer)
|
|||
Picture1.Refresh
|
||||
End If
|
||||
End Sub</code></pre>
|
||||
<p>Without a colour, drawing uses ForeColor. Step makes a point relative to CurrentX, CurrentY, which every drawing method leaves at its last point. Coordinates, radii, CurrentX and CurrentY, and PaintPicture's rectangles are in the scale's units (a radius in its horizontal units); DrawWidth is always in pixels. An argument out of range -- a colour, an angle past 2 pi, a Scale whose two corners are on one line -- raises error 5 (Illegal function call), PaintPicture without a picture, x, and y error 449 (Argument not optional) and with something that is no picture error 481 (Invalid picture), on a form, a PictureBox, and the Printer alike: ON ERROR traps each, as in Visual Basic, and Err.Description says what was wrong.</p>
|
||||
<p>Without a color, drawing uses ForeColor. Step makes a point relative to CurrentX, CurrentY, which every drawing method leaves at its last point. Coordinates, radii, CurrentX and CurrentY, and PaintPicture's rectangles are in the scale's units (a radius in its horizontal units); DrawWidth is always in pixels. An argument out of range -- a color, an angle past 2 pi, a Scale whose two corners are on one line -- raises error 5 (Illegal function call), PaintPicture without a picture, x, and y error 449 (Argument not optional) and with something that is no picture error 481 (Invalid picture), on a form, a PictureBox, and the Printer alike: ON ERROR traps each, as in Visual Basic, and Err.Description says what was wrong.</p>
|
||||
<h2>Raster Operations</h2>
|
||||
<p>PaintPicture's opcode says how each copied pixel is combined with the pixel already there (the destination) and with the FillColor (the pattern), as in Visual Basic. Leaving it out copies the picture (vbSrcCopy).</p>
|
||||
<pre> Constant Value Result
|
||||
|
|
@ -7022,40 +7083,40 @@ End Sub</code></pre>
|
|||
vbPatPaint &HFB0A09 Pattern OR NOT picture OR destination
|
||||
vbPatInvert &H5A0049 Pattern XOR destination
|
||||
vbDstInvert &H550009 NOT destination
|
||||
vbGrayCopy &H1000000 The picture greyed, as DVX shows a disabled picture (DVX only)
|
||||
vbTransparentCopy &H2000000 Every pixel of the picture but the key colour: a colour given after the opcode, else the colour of the picture's top-left pixel (DVX only)</pre>
|
||||
vbGrayCopy &H1000000 The picture grayed, as DVX shows a disabled picture (DVX only)
|
||||
vbTransparentCopy &H2000000 Every pixel of the picture but the key color: a color given after the opcode, else the color of the picture's top-left pixel (DVX only)</pre>
|
||||
<p>vbGrayCopy and vbTransparentCopy copy the picture at its own size (width and height are not used): Picture1.PaintPicture "ship.bmp", x, y, 32, 32, 0, 0, 32, 32, vbTransparentCopy, vbMagenta draws a sprite. A picture file (or a LOADPICTURE picture) drawn again and again, a sprite in a game loop say, is read from the disk only the first time while the program runs and the file does not change (about a megabyte of pictures is kept that way).</p>
|
||||
<p>Any of the 256 raster operations of Windows can be given by its number; the bits work on the pixel values, so with fewer than 32 bits a pixel the results follow the display's colour format.</p>
|
||||
<p>Any of the 256 raster operations of Windows can be given by its number; the bits work on the pixel values, so with fewer than 32 bits a pixel the results follow the display's color format.</p>
|
||||
<pre><code>Picture1.PaintPicture Picture2, 0, 0, 32, 32, 0, 0, 32, 32, vbSrcInvert ' XOR the picture in
|
||||
Picture1.PaintPicture Picture2, 0, 0, 32, 32, 0, 0, 32, 32, vbSrcInvert ' and out again</code></pre>
|
||||
<h2>Scales</h2>
|
||||
<p>ScaleMode picks the units: 0 user (set by Scale or the Scale properties), 1 twips (1440 an inch, 15 a pixel), 2 points (72 an inch), 3 pixels, 4 characters (120 twips across, 240 down), 5 inches, 6 millimetres, 7 centimetres. Unlike Visual Basic, whose default is twips, DVX starts every form and PictureBox in pixels (ScaleMode 3), and Scale without arguments goes back to pixels. Setting ScaleLeft, ScaleTop, ScaleWidth, or ScaleHeight makes a user scale from the current one; ScaleWidth and ScaleHeight may not be 0, and ScaleMode must be 0 to 7 (error 380 otherwise). With a user scale the units stay fixed to the picture's edges when it is resized; other scale modes keep their unit size.</p>
|
||||
<p>ScaleMode picks the units: 0 user (set by Scale or the Scale properties), 1 twips (1440 an inch, 15 a pixel), 2 points (72 an inch), 3 pixels, 4 characters (120 twips across, 240 down), 5 inches, 6 millimeters, 7 centimeters. Unlike Visual Basic, whose default is twips, DVX starts every form and PictureBox in pixels (ScaleMode 3), and Scale without arguments goes back to pixels. Setting ScaleLeft, ScaleTop, ScaleWidth, or ScaleHeight makes a user scale from the current one; ScaleWidth and ScaleHeight may not be 0, and ScaleMode must be 0 to 7 (error 380 otherwise). With a user scale the units stay fixed to the picture's edges when it is resized; other scale modes keep their unit size.</p>
|
||||
<p>The constants vbUser (0), vbTwips (1), vbPoints (2), vbPixels (3), vbCharacters (4), vbInches (5), vbMillimeters (6), and vbCentimeters (7) name the scale modes. The units assume a standard display of 96 pixels an inch (15 twips a pixel), whatever the screen really is, so an inch is always 96 pixels.</p>
|
||||
<p>ScaleX and ScaleY convert a width or a height from one scale to another, as in Visual Basic: fromScale is the scale the value is in, vbHimetric (8, hundredths of a millimetre, the unit of a Picture's Width and Height) when it is left out; toScale the scale wanted, the object's ScaleMode when left out. vbUser means the object's current scale. Visual Basic's vbContainerPosition and vbContainerSize are not available; any other scale number raises error 5, which ON ERROR can trap.</p>
|
||||
<p>ScaleX and ScaleY convert a width or a height from one scale to another, as in Visual Basic: fromScale is the scale the value is in, vbHimetric (8, hundredths of a millimeter, the unit of a Picture's Width and Height) when it is left out; toScale the scale wanted, the object's ScaleMode when left out. vbUser means the object's current scale. Visual Basic's vbContainerPosition and vbContainerSize are not available; any other scale number raises error 5, which ON ERROR can trap.</p>
|
||||
<pre><code>Picture1.Scale (0, 100)-(100, 0) ' 0..100 across, y going up
|
||||
Picture1.Line (0, 0)-(100, 100), RGB(255, 0, 0)
|
||||
Picture1.ScaleMode = 7 ' centimetres
|
||||
Picture1.ScaleMode = 7 ' centimeters
|
||||
Picture1.Circle (2, 2), 1
|
||||
|
||||
Dim pic As Object
|
||||
Set pic = LoadPicture("logo.bmp")
|
||||
w = Me.ScaleX(pic.Width, vbHimetric, vbPixels) ' the picture's width in pixels</code></pre>
|
||||
<h2>AutoRedraw and the Paint Event</h2>
|
||||
<p>A form or PictureBox fires its Paint event when it is shown, when the form is resized, when a PictureBox changes size (its Width or Height set to a new value, or its Resize method) while its form is showing, and when the program calls its Refresh method, so a program can draw everything in Paint as in Visual Basic. A PictureBox also fires its Resize event, before that Paint, whenever its drawing takes another size: its Width or Height set, its Resize method, or a Picture or Load of another size, as in Visual Basic (what its .frm sets as the form loads fires none). Unlike Visual Basic, DVX keeps what was drawn even with AutoRedraw False (the default), so drawing outside Paint also stays on the screen. With AutoRedraw = True, Paint does not fire. A program that sets AutoRedraw = False itself gets Visual Basic's behaviour exactly: the drawing is cleared to BackColor before each Paint.</p>
|
||||
<p>A form or PictureBox fires its Paint event when it is shown, when the form is resized, when a PictureBox changes size (its Width or Height set to a new value, or its Resize method) while its form is showing, and when the program calls its Refresh method, so a program can draw everything in Paint as in Visual Basic. A PictureBox also fires its Resize event, before that Paint, whenever its drawing takes another size: its Width or Height set, its Resize method, or a Picture or Load of another size, as in Visual Basic (what its .frm sets as the form loads fires none). Unlike Visual Basic, DVX keeps what was drawn even with AutoRedraw False (the default), so drawing outside Paint also stays on the screen. With AutoRedraw = True, Paint does not fire. A program that sets AutoRedraw = False itself gets Visual Basic's behavior exactly: the drawing is cleared to BackColor before each Paint.</p>
|
||||
<pre><code>Sub Picture1_Paint ()
|
||||
Picture1.Circle (50, 50), 40, RGB(0, 128, 0)
|
||||
End Sub</code></pre>
|
||||
<h2>Drawing Properties</h2>
|
||||
<pre> Property Type Default Description
|
||||
-------- ---- ------- -----------
|
||||
ForeColor Long &H000000 Colour of drawing and printing.
|
||||
BackColor Long &HFFFFFF Colour Cls clears to. Setting it clears the drawing to the new colour.
|
||||
ForeColor Long &H000000 Color of drawing and printing.
|
||||
BackColor Long &HFFFFFF Color Cls clears to. Setting it clears the drawing to the new color.
|
||||
CurrentX Single 0 Where the next drawing or printing starts.
|
||||
CurrentY Single 0
|
||||
DrawWidth Integer 1 Pen width in pixels; below 1 raises error 380 (Invalid property value), as in Visual Basic.
|
||||
DrawStyle Integer 0 The pen's lines and outlines: 0 solid, 1 dashes, 2 dots, 3 dash-dot, 4 dash-dot-dot (a pen 1 pixel wide only; a wider one draws solid), 5 none at all (fills are still drawn), 6 solid. Other values raise error 380 (Invalid property value), which ON ERROR can trap; the property keeps its value. The constants vbSolid to vbInsideSolid name them.
|
||||
FillStyle Integer 1 How boxes (B) and circles are filled with FillColor: 0 solid, 1 (the default) not at all, 2 horizontal lines, 3 vertical lines, 4 upward diagonals, 5 downward diagonals, 6 a cross hatch, 7 a diagonal cross hatch (the lines 8 pixels apart, the gaps left as they are). Other values raise error 380. BF fills solid in the line's colour. The constants vbFSSolid to vbDiagonalCross name them.
|
||||
FillColor Long &H000000 Colour boxes and circles are filled with.
|
||||
FillStyle Integer 1 How boxes (B) and circles are filled with FillColor: 0 solid, 1 (the default) not at all, 2 horizontal lines, 3 vertical lines, 4 upward diagonals, 5 downward diagonals, 6 a cross hatch, 7 a diagonal cross hatch (the lines 8 pixels apart, the gaps left as they are). Other values raise error 380. BF fills solid in the line's color. The constants vbFSSolid to vbDiagonalCross name them.
|
||||
FillColor Long &H000000 Color boxes and circles are filled with.
|
||||
FontScale Integer 1 How many times as large Print writes its text (1 to 8): each dot of the font becomes a FontScale x FontScale block, for titles and banners. TextWidth and TextHeight follow it; PrintAccel does not.
|
||||
AutoRedraw Boolean False True: no Paint events (see above).
|
||||
ScaleMode Integer 3 Units of the coordinates (see Scales).
|
||||
|
|
@ -7205,7 +7266,7 @@ End</code></pre>
|
|||
Index Integer R Its index in its menu control array; error 343 (Object not an array) for one in none.
|
||||
Caption String R/W The text, with & before its access key. Setting it keeps an item's key text (Shortcut or ShortcutText), and reading it gives the text without it. As in Visual Basic, "-" makes an item a separator line and other text makes a separator an item again; a separator's Caption reads "-". On a menu of the menu bar the new title is shown at once, and Alt and its new access key open it.
|
||||
Checked Boolean R/W Whether the item shows a checkmark. Setting it on an item that has neither Checked nor RadioCheck in the .frm makes it a check item (as in VB, any item can be checked). A menu of the menu bar or a popup menu reads False and has none to set.
|
||||
Enabled Boolean R/W Whether it is enabled. A menu of the menu bar set to False is greyed: it does not open, by the mouse or by the keyboard (Alt and its access key, F10, Left and Right pass over it).
|
||||
Enabled Boolean R/W Whether it is enabled. A menu of the menu bar set to False is grayed: it does not open, by the mouse or by the keyboard (Alt and its access key, F10, Left, and Right pass over it).
|
||||
Visible Boolean R/W Whether it is shown. A hidden item, separator, or submenu (with everything in it) is out of its menu and keeps its caption, checkmark, and place: shown again, it returns where it was. A menu of the menu bar set to False leaves the bar (it is then a popup menu PopupMenu can still show); when the last one goes the menu bar goes too, and the window keeps its size, so the form's inside grows (its Resize runs) -- and shrinks again when one is shown.
|
||||
Shortcut String R/W The key that runs the item ("Ctrl+K", written as in the .frm file, "" for none). Setting it changes the key and the key text shown in the item; "" removes both. An unknown key is an error. A menu of the menu bar or a popup menu reads "" and has none to set.
|
||||
Tag String R/W Any text the program keeps with the menu (the .frm's Tag to start with; "" for an element LOAD made).</pre>
|
||||
|
|
@ -7287,7 +7348,7 @@ Sub mnuEdit_Click ()
|
|||
End Sub</code></pre>
|
||||
<p>Menus a program changes while it runs, as in Visual Basic:</p>
|
||||
<pre><code>mnuFile.Caption = "&Archivo" ' a new title (Alt+A opens it)
|
||||
mnuEdit.Enabled = False ' greyed on the menu bar
|
||||
mnuEdit.Enabled = False ' grayed on the menu bar
|
||||
mnuDebug.Visible = False ' off the menu bar
|
||||
Me.PopupMenu mnuPop ' a hidden menu of the .frm as a popup menu</code></pre>
|
||||
<p><a href="#ctrl.form">Form</a></p>
|
||||
|
|
@ -7327,7 +7388,7 @@ End Sub</code></pre>
|
|||
Command1(1).Enabled = False</code></pre>
|
||||
<blockquote><strong>Note:</strong> An index there is no element for (Btn(5) with no Btn(5)) raises error 340 (Control array element doesn't exist), as in Visual Basic. Control array elements share the same event handler Sub. The runtime prepends the Index argument automatically. If you define parameters on the Sub, Index comes first, followed by the event's own parameters (e.g. KeyPress would be Sub Ctrl1_KeyPress (Index As Integer, KeyAscii As Integer)). An element's Index property reads its index.</blockquote>
|
||||
<h2>Adding and Removing Elements</h2>
|
||||
<p>As in Visual Basic, Load adds an element to a control array while the program runs, and Unload removes one Load added. The new element is a copy of the array's lowest element as the .frm made it -- its text, size, colours, font, Tag, and the control's own properties at design time (what the program changed since is not copied) -- placed after the array's last element in that element's container, and it starts hidden:</p>
|
||||
<p>As in Visual Basic, Load adds an element to a control array while the program runs, and Unload removes one Load added. The new element is a copy of the array's lowest element as the .frm made it -- its text, size, colors, font, Tag, and the control's own properties at design time (what the program changed since is not copied) -- placed after the array's last element in that element's container, and it starts hidden:</p>
|
||||
<pre><code>Load Command1(3)
|
||||
Command1(3).Caption = "Button D"
|
||||
Command1(3).Visible = True
|
||||
|
|
@ -7444,16 +7505,18 @@ End Sub</code></pre>
|
|||
MaxWidth Integer 0 The widest the user can make the window, by dragging or maximizing; 0 is the screen's width. A window wider than a new MaxWidth shrinks to it. Also in the .frm file.
|
||||
MaxHeight Integer 0 The tallest the window can be made, as MaxWidth; 0 is the screen's height.
|
||||
GameInput Boolean False True for a game: while the form has the keyboard, every key goes to it -- none to F1 (help), F10 or Alt (the menu bar), menu shortcuts, or DVX's shortcut keys. Only Alt+Tab, Ctrl+Esc, and Alt+F4 still reach DVX. Also in the .frm file.
|
||||
FullScreen Boolean False True gives the form the whole screen: a video mode as large as the form's inside (its controls and drawing, without the title bar), the form shown on it at the largest whole multiple of its size that fits, centred on black, kept up to date as it changes. The mouse works on it as in the window, and every key goes to it as with GameInput. A hidden form is shown first. When the user switches to another program (Alt+Tab, Ctrl+Esc), or the program shows a message box or another form, the desktop comes back; the form gets the whole screen again with the focus. Reads False when no video mode could be set (the form stays in its window). False gives the desktop back. Run time only; see the FullScreen event.</pre>
|
||||
FullScreen Boolean False True gives the form the whole screen: a video mode as large as the form's inside (its controls and drawing, without the title bar), the form shown on it at the largest whole multiple of its size that fits, centered on black, kept up to date as it changes. The mouse works on it as in the window, and every key goes to it as with GameInput. A hidden form is shown first. When the user switches to another program (Alt+Tab, Ctrl+Esc), or the program shows a message box or another form, the desktop comes back; the form gets the whole screen again with the focus. Reads False when no video mode could be set (the form stays in its window). False gives the desktop back. Run time only; see the FullScreen event.</pre>
|
||||
<p>Maximizing a window, or restoring a maximized one, changes its size, so Resize fires. Minimizing does not change the size and fires no Resize. A minimized window keeps its maximized state: set WindowState = vbMaximized to bring it back filling the screen, vbNormal to bring it back at its normal size.</p>
|
||||
<pre><code>frmTerminal.Show
|
||||
frmTerminal.WindowState = vbMinimized ' starts as an icon</code></pre>
|
||||
<h2>Form Events</h2>
|
||||
<pre> Event Parameters Description
|
||||
----------- --------------------- -------------------------------------------
|
||||
Initialize (none) Fires when a form instance is made: the first use of the form's name (even Set f = Form1, which does not load it; the startup form's as the program starts), New, or LoadFormText. It comes before the form's Load, with the form's variables as the form will load with them.
|
||||
Load (none) Fires after the form and all controls are created. This is the default event.
|
||||
Unload (none) Fires when the form is being closed or unloaded.
|
||||
QueryUnload Cancel As Integer Fires before Unload. Set Cancel = 1 to abort the close.
|
||||
Unload Cancel As Integer Fires when the form is being closed or unloaded, after QueryUnload. Set Cancel = 1 to keep the form loaded, as in Visual Basic. A handler without the parameter (Sub Form1_Unload) runs too.
|
||||
QueryUnload Cancel As Integer, UnloadMode As Integer Fires before Unload. Set Cancel = 1 to abort the close. UnloadMode says why the form closes: vbFormControlMenu (0) the user closed its window (its close box, Alt+F4, or the system menu's Close), vbFormCode (1) Unload in the program's code, vbAppWindows (2) DVX is exiting, vbAppTaskManager (3) another program asked this one to close (ShellRunningClose) or DVX ended its screen saver. DVX has no MDI forms or owned forms, so vbFormMDIForm (4) and vbFormOwner (5) never come. A handler that takes Cancel alone (Sub Form1_QueryUnload(Cancel As Integer)) runs too, as one without parameters does. End Task in Task Manager ends a program without running its code, so no QueryUnload comes then.
|
||||
Terminate (none) Fires when a form instance is gone: it is not loaded and nothing refers to it any more, as in Visual Basic. It runs as soon as the last reference goes, before the code goes on: Set Form1 = Nothing after its Unload when no variable still holds it, Set f = Nothing or another value for the last variable holding a copy New made, the end of the procedure whose local variable held it, or the Unload of a copy nothing else refers to; a copy LoadFormText made as its Unload frees it. It also fires for every instance left as the program ends normally (not with END). Never while the form is loaded; the handler still has the form's variables.
|
||||
Resize (none) Fires when the window changes size: resized by the user, maximized, or restored (by the user or WindowState).
|
||||
Activate (none) Fires when the window gains focus.
|
||||
Deactivate (none) Fires when the window loses focus.
|
||||
|
|
@ -7466,7 +7529,7 @@ frmTerminal.WindowState = vbMinimized ' starts as an icon</code></pre>
|
|||
DesignKey KeyCode As Integer, Shift As Integer In design mode: a key was pressed in the form (KeyCode and Shift as in KeyDown).
|
||||
DesignPropertyChanged CtrlName As String, PropertyName As String In design mode: the code of a UserControl on the form called PropertyChanged. See Designing Forms below.</pre>
|
||||
<p>See Drag and Drop under Common Properties, Events, and Methods. While a control is dragged over a form with no DragDrop event procedure, the mouse pointer shows the "no drop" sign.</p>
|
||||
<p>A variable declared WithEvents As the form's type (Dim WithEvents f As Form2), or As Form, gets the events of the form instance it holds too, after the form's own handlers (Sub f_Load, Sub f_QueryUnload(Cancel As Integer)); a Cancel either handler sets keeps the form loaded. See Events of a Form under Events in the Language Reference.</p>
|
||||
<p>A variable declared WithEvents As the form's type (Dim WithEvents f As Form2), or As Form, gets the events of the form instance it holds too, after the form's own handlers (Sub f_Load, Sub f_QueryUnload(Cancel As Integer, UnloadMode As Integer)); a Cancel either handler sets keeps the form loaded. Initialize and Terminate reach only the form's own handlers. A form's code can also declare events of its own (Public Event) and raise them (RaiseEvent), which a variable declared WithEvents As that form handles. See Events of a Form and A Form's Own Events under Events in the Language Reference.</p>
|
||||
<h2>New Arguments</h2>
|
||||
<p>A program with a NewArgs event procedure on any of its forms can be handed new arguments while it runs, instead of DVX starting another copy of it. COMMAND$ (and COMMAND$(1), COMMAND$(2), ...) then give the new arguments, and NewArgs fires on every loaded form that has the procedure (a form not loaded yet gets nothing: forms load when the program first refers to them). When the arguments arrive while one of the program's event procedures is still running -- for example while it shows a message box or a dialog, or a form with vbModal -- they are held, and NewArgs fires once that procedure has finished; if several arrive meanwhile, only the last is given.</p>
|
||||
<p>DVX hands new arguments to the help viewer: F1 and the Help menus of programs (and HelpView in BASIC) send "helpfile topic" to the program installed as APPS\KPUNCH\DVXHELP\DVXHELP.APP when it is already running. A help viewer written in BASIC and installed there gets them in NewArgs. Starting a program that is already running -- from Program Manager, the Run dialog, a document opened in it, or ShellRun -- gives it the new arguments when it allows only one copy and has a NewArgs procedure: its window comes to the front and NewArgs fires. Without a NewArgs procedure DVX says it is already running; a program that allows more than one copy (Project Properties) starts another copy instead.</p>
|
||||
|
|
@ -7502,7 +7565,7 @@ f.Show
|
|||
|
||||
Dim g As New Form1 ' declares and makes a copy at once</code></pre>
|
||||
<p>A variable declared As the form's name holds only that form or a copy of it, as in Visual Basic, and knows the form's members: f.Count, f.Refill, f.Text1, and the properties and methods every form has (f.Caption, f.Show, f.Controls(0)) are looked up when the program is compiled -- in the IDE and by the command-line compiler alike -- so a misspelled name, or one of the form's Private variables or procedures, is reported then, as for Form1.Count and Form1.Xyzzy. A control CreateControl adds while the program runs is no member the compiler knows: use the reference CreateControl gives, or Form1.Controls("name"). Storing another form in it (Set f = Form2, Set f = New Form2) does not compile when the compiler knows what is stored; a value it cannot know until the program runs (from a variable As Object or As Form) raises error 13 (Type mismatch) there when it is not a Form1. The same holds for a parameter declared As Form1, a FUNCTION's result As Form1, and a Private or Public variable As Form1 of a form's or a class's code. Through a variable As Object or As Form, members are found by their names when the program runs: that variable can hold any form, and f.Show then shows whichever form it holds (and runs the Show of a class's object, which has its own).</p>
|
||||
<p>The code of the form serves every copy. In it, Me, the controls named on their own (Text1), and the form-level variables are those of the copy whose event is running, so each window keeps its own state. Unload f closes that copy only. The copy keeps its variables, and its next use (f.Show) loads that same copy again, with its Load event, as in Visual Basic. So does Me after Unload Me in the form's own code: Unload Me then Me.Show in one handler closes the window and loads the form again. A copy's variables are freed once it is not loaded and nothing refers to it any more.</p>
|
||||
<p>The code of the form serves every copy. In it, Me, the controls named on their own (Text1), and the form-level variables are those of the copy whose event is running, so each window keeps its own state. Unload f closes that copy only. The copy keeps its variables, and its next use (f.Show) loads that same copy again, with its Load event, as in Visual Basic. So does Me after Unload Me in the form's own code: Unload Me then Me.Show in one handler closes the window and loads the form again. A copy's variables are freed once it is not loaded and nothing refers to it any more, after its Terminate event; its Initialize event runs as New makes it.</p>
|
||||
<p>The form's name (Form1.Caption, Form1.Show, Load Form1) is Visual Basic's predeclared form variable: it means the program's own form of that name, unless SET gives it another one. Using the name when that form is not loaded (it was never used, or it was unloaded) loads it, with its Load event. Taking the form as an object does not load it, as in Visual Basic: Set f = Form1, TypeName(Form1), Form1 given for an object parameter (CreateControl's too), and f Is Form1 make a reference to the form, which loads (with its Load event) at the first use of one of its properties, methods, or controls through it (f.Caption, f.Text1, f.Show). The reference keeps meaning the form: f Is Me in the form's code is True, and after Unload Form1 a use of f loads the form again. Set Form1 = f, with a copy of Form1, makes the name mean that copy from then on, and Set Form1 = New Form1 a fresh copy. Set Form1 = Nothing lets go of the form the name held: a variable that still refers to it keeps it, with its variables, and one that is loaded stays loaded; the name's next use makes a new Form1, with new variables, as in Visual Basic. CreateForm with the name of one of the program's forms gives that form too (loaded, with its Load event, when it is not), and a form LoadFormText makes with such a name is a copy of its own.</p>
|
||||
<p>The form's variables are the program's form's whether it is loaded or not. They are made before any of the form's code runs, as in Visual Basic: a fixed array sized, a TYPE variable given its record, a STRING * n filled with spaces, an object variable Nothing (a WithEvents one ready for its events), a Variant Empty, any other variable its type's zero (VarType of a Long is vbLong before it is first set), so the form's code outside procedures may use them before their DIM lines, and a DIM there does nothing when it runs. A procedure of Form1's code that runs while Form1 is not loaded -- one SetEvent made the handler of a control on another form, for example -- has Form1's variables, made then with their starting values, and Form1 has them when it loads. Unloading the form keeps them, as in Visual Basic: its next load runs its Load event with them as they were (their starting values are not set again), so a form can remember what it showed. Set Form1 = Nothing lets them go with the form: they are freed once nothing refers to it and it is not loaded, and the name's next use starts them again. A copy New made has its own variables, kept while it is unloaded and freed once nothing refers to it.</p>
|
||||
<p>A form's SUBs and FUNCTIONs (those not declared PRIVATE) are its methods, as in Visual Basic: Form2.Refill, x = Form2.Twice(3), x = Form2.Total (a FUNCTION without arguments, read without parentheses), and the same through a variable (f.Refill), including Property Get and Property Let procedures (Form2.Title = "x"). Through a variable declared As Object (or As Form, or As the form's name) the arguments go as they do to a class's procedures (see Using Objects in the language reference): each is converted to its parameter's type, a variable given for a parameter without BYVAL gets what the procedure stores in it, an OPTIONAL one left out takes its default, and arguments can be given by name (f.Refill count:=3). A SUB or FUNCTION of Form2's code called by its name alone from elsewhere (Refill) runs for Form2 the same way. Each runs for that form: with its form-level variables, Me as that form, and its controls named alone. Calling one does not load the form, so a Property Let the program sets before Show is there for the form's Load, Visual Basic's way to hand a form its data.</p>
|
||||
|
|
@ -7549,10 +7612,12 @@ End Sub</code></pre>
|
|||
Print "Form loaded!"
|
||||
End Sub
|
||||
|
||||
Sub Form1_QueryUnload (Cancel As Integer)
|
||||
Sub Form1_QueryUnload (Cancel As Integer, UnloadMode As Integer)
|
||||
If UnloadMode = vbFormControlMenu Then
|
||||
If MsgBox("Really quit?", 4) <> 6 Then
|
||||
Cancel = 1
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Sub Form1_Resize ()
|
||||
|
|
@ -7612,7 +7677,7 @@ End Sub</code></pre>
|
|||
------- -------
|
||||
Width, Height The natural size in pixels: the smallest size the form's layout gives it (64 x 64 when not given). The code changes it with UserControl.MinWidth and MinHeight.
|
||||
CanGetFocus True (the default): a click or Tab gives it the keyboard focus. False: it never has the focus and gets no keys.
|
||||
BackColor The colour Cls clears it to (white when not given).
|
||||
BackColor The color Cls clears it to (white when not given).
|
||||
ToolboxIcon A 24 x 24 picture file in the project folder, shown in the designer's toolbox.
|
||||
Description The toolbox tooltip (its name when not given).
|
||||
DefaultEvent The event the designer opens when the control is double-clicked.</pre>
|
||||
|
|
@ -7717,9 +7782,9 @@ Count = 1</code></pre>
|
|||
<pre> Property Type Description
|
||||
---------- ------- -------------------------------------------
|
||||
Cols Integer Number of character columns (1-512). Setting Cols or Rows gives the terminal a new size, starting as a new terminal: empty screen and scrollback, modes the host set reset (its colors and connection stay); set the form's AutoSize to True afterwards to fit the window to it.
|
||||
Music Boolean Whether ANSI music sequences (ESC[M, ESC[N, ESC[| followed by PLAY text, as BBSes send) are recognised (True at first): each raises the Music event instead of being shown. False: ESC[M is always Delete Line, and ESC[N and ESC[| do nothing.
|
||||
Music Boolean Whether ANSI music sequences (ESC[M, ESC[N, ESC[| followed by PLAY text, as BBSes send) are recognized (True at first): each raises the Music event instead of being shown. False: ESC[M is always Delete Line, and ESC[N and ESC[| do nothing.
|
||||
Rows Integer Number of character rows (1-512).
|
||||
Scrollback Integer Maximum number of scrollback lines. Older lines are dropped (default 500). Setting it discards the existing history.</pre>
|
||||
Scrollback Integer Maximum number of scrollback lines. Older lines are dropped (default 500). Setting another number keeps the newest lines that fit; setting the same number changes nothing.</pre>
|
||||
<h2>Type-Specific Methods</h2>
|
||||
<pre> Method Description
|
||||
------ -----------
|
||||
|
|
@ -8250,7 +8315,7 @@ End Sub</code></pre>
|
|||
Stretch Boolean When True, an image larger than the control is scaled down to fit, keeping its proportions; a smaller image stays at natural size. When False, the image is shown at natural size.
|
||||
ImageWidth Integer Width of the loaded image in pixels (read-only).
|
||||
ImageHeight Integer Height of the loaded image in pixels (read-only).
|
||||
MaskColor Long The transparent colour (an RGB value): with UseMaskColor True, pixels of this colour are not drawn, so the form shows through.
|
||||
MaskColor Long The transparent color (an RGB value): with UseMaskColor True, pixels of this color are not drawn, so the form shows through.
|
||||
UseMaskColor Boolean True leaves out the pixels of MaskColor (default False).</pre>
|
||||
<h2>Type-Specific Methods</h2>
|
||||
<pre> Method Description
|
||||
|
|
@ -8772,7 +8837,7 @@ End Sub</code></pre>
|
|||
Cut Copy the selection to the clipboard and remove it (Ctrl+X); fires Change.
|
||||
FindNext needle$, caseSensitive, forward Search from the cursor and select the match. A forward search finds a match starting at the cursor; repeating it moves on to the next match. Returns True if found.
|
||||
GetLine(line%) Returns the text of a line (1 = the first) without its line end; "" past the last line.
|
||||
GetSyntaxColor(index%) Returns the colour the syntax colouring draws that kind of text in (index as for SetSyntaxColor); -1 for the area's ForeColor.
|
||||
GetSyntaxColor(index%) Returns the color the syntax coloring draws that kind of text in (index as for SetSyntaxColor); -1 for the area's ForeColor.
|
||||
GetWordAtCursor() Returns the word under the cursor.
|
||||
GoToLine line% Scroll to the given line and select it.
|
||||
Paste Put the clipboard's text in place of the selection (Ctrl+V); fires Change.
|
||||
|
|
@ -8784,8 +8849,8 @@ End Sub</code></pre>
|
|||
SetCursor line%, col% Move the cursor to a line and column (both start at 1) without selecting anything. Values past the end clamp to the text.
|
||||
SetLineMarker line%, gutterColor&, backColor& Mark a line (1 = the first): a dot of gutterColor in the line-number gutter (a breakpoint) and / or the line's background in backColor (the current line). -1 leaves that part out; -1 for both removes the marker. Markers stay on their line numbers when the text changes.
|
||||
SetShowLineNumbers show Show or hide the line number gutter.
|
||||
SetSyntaxColor index%, color& The colour of one kind of text: 0 plain text, 1 keywords, 2 strings, 3 comments, 4 numbers, 5 operators, 6 types (and True, False, Nothing); -1 restores the default.
|
||||
SetSyntaxMode mode$ Activate syntax highlighting. Modes: "dhs" (help source), "bas" (BASIC, coloured as the DVX BASIC IDE colours it), "custom" (the program colours each line in the Colorize event). Pass "" to disable.
|
||||
SetSyntaxColor index%, color& The color of one kind of text: 0 plain text, 1 keywords, 2 strings, 3 comments, 4 numbers, 5 operators, 6 types (and True, False, Nothing); -1 restores the default.
|
||||
SetSyntaxMode mode$ Activate syntax highlighting. Modes: "dhs" (help source), "bas" (BASIC, colored as the DVX BASIC IDE colors it), "custom" (the program colors each line in the Colorize event). Pass "" to disable.
|
||||
SetTabWidth width% Set the tab stop width in characters.
|
||||
SetUseTabChar useChar When True, Tab inserts a tab character; when False, inserts spaces.
|
||||
Undo Take back the last change (Ctrl+Z; characters typed one after another are one change); a second Undo puts it back.</pre>
|
||||
|
|
@ -8794,7 +8859,7 @@ End Sub</code></pre>
|
|||
<pre> Event Parameters Description
|
||||
----------- ----------------------- -------------------------------------------
|
||||
GutterClick LineNumber As Integer The line-number gutter (shown by SetShowLineNumbers) was clicked beside a line: toggle a breakpoint there. A click in the gutter does not move the cursor.
|
||||
Colorize LineText As String, Colors As String With SetSyntaxMode "custom", for every line as it is drawn: Colors comes with one "0" for each character of LineText; set each to the digit of a syntax colour (vbSyntaxText 0 to vbSyntaxType 6, colours as SetSyntaxColor sets them). Characters it leaves out stay plain. It runs when a line is drawn with text it has not coloured lately (the colours it gave are kept with the text, so a line drawn again unchanged does not ask again), so it must be quick and must not change the area; its colours should depend only on LineText. SetSyntaxMode "custom" again colours every line afresh (after the program changes how it colours).</pre>
|
||||
Colorize LineText As String, Colors As String With SetSyntaxMode "custom", for every line as it is drawn: Colors comes with one "0" for each character of LineText; set each to the digit of a syntax color (vbSyntaxText 0 to vbSyntaxType 6, colors as SetSyntaxColor sets them). Characters it leaves out stay plain. It runs when a line is drawn with text it has not colored lately (the colors it gave are kept with the text, so a line drawn again unchanged does not ask again), so it must be quick and must not change the area; its colors should depend only on LineText. SetSyntaxMode "custom" again colors every line afresh (after the program changes how it colors).</pre>
|
||||
<pre><code>TextArea1.SetSyntaxMode "custom"
|
||||
|
||||
Sub TextArea1_Colorize (LineText As String, Colors As String)
|
||||
|
|
@ -8820,7 +8885,7 @@ Dim count As Integer
|
|||
count = TextArea1.ReplaceAll("old", "new", False)
|
||||
Print "Replaced"; count; "occurrences"
|
||||
|
||||
' A code editor: BASIC colours, a breakpoint dot on the clicked line
|
||||
' A code editor: BASIC colors, a breakpoint dot on the clicked line
|
||||
TextArea1.SetSyntaxMode "bas"
|
||||
|
||||
Sub TextArea1_GutterClick (LineNumber As Integer)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
1219124
docs/manual/dvxManual.pdf
1219124
docs/manual/dvxManual.pdf
File diff suppressed because one or more lines are too long
BIN
docs/manual/dvxManualCover.pdf
Normal file
BIN
docs/manual/dvxManualCover.pdf
Normal file
Binary file not shown.
824718
docs/manual/dvxManualInterior.pdf
Normal file
824718
docs/manual/dvxManualInterior.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
docs/manual/images/aboutDesktop.png
(Stored with Git LFS)
BIN
docs/manual/images/aboutDesktop.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adAvailable.png
(Stored with Git LFS)
BIN
docs/manual/images/adAvailable.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adInstalled.png
(Stored with Git LFS)
BIN
docs/manual/images/adInstalled.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adPlan.png
(Stored with Git LFS)
BIN
docs/manual/images/adPlan.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adPublished.png
(Stored with Git LFS)
BIN
docs/manual/images/adPublished.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adRemoveNeeds.png
(Stored with Git LFS)
BIN
docs/manual/images/adRemoveNeeds.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adSetupParts.png
(Stored with Git LFS)
BIN
docs/manual/images/adSetupParts.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adUpdatePlan.png
(Stored with Git LFS)
BIN
docs/manual/images/adUpdatePlan.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/adUpdates.png
(Stored with Git LFS)
BIN
docs/manual/images/adUpdates.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpColors.png
(Stored with Git LFS)
BIN
docs/manual/images/cpColors.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpDesktop.png
(Stored with Git LFS)
BIN
docs/manual/images/cpDesktop.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpFileTypes.png
(Stored with Git LFS)
BIN
docs/manual/images/cpFileTypes.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpGameControllers.png
(Stored with Git LFS)
BIN
docs/manual/images/cpGameControllers.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpMouse.png
(Stored with Git LFS)
BIN
docs/manual/images/cpMouse.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpNetwork.png
(Stored with Git LFS)
BIN
docs/manual/images/cpNetwork.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpPrinter.png
(Stored with Git LFS)
BIN
docs/manual/images/cpPrinter.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpSounds.png
(Stored with Git LFS)
BIN
docs/manual/images/cpSounds.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/cpVideo.png
(Stored with Git LFS)
BIN
docs/manual/images/cpVideo.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtDesktop.png
(Stored with Git LFS)
BIN
docs/manual/images/dtDesktop.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtDriveNotReady.png
(Stored with Git LFS)
BIN
docs/manual/images/dtDriveNotReady.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtDropDown.png
(Stored with Git LFS)
BIN
docs/manual/images/dtDropDown.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtMenu.png
(Stored with Git LFS)
BIN
docs/manual/images/dtMenu.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtOpen.png
(Stored with Git LFS)
BIN
docs/manual/images/dtOpen.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtSaveChanges.png
(Stored with Git LFS)
BIN
docs/manual/images/dtSaveChanges.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtTaskManager.png
(Stored with Git LFS)
BIN
docs/manual/images/dtTaskManager.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/dtWindow.png
(Stored with Git LFS)
BIN
docs/manual/images/dtWindow.png
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,5 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="900" height="810" viewBox="0 0 900 810">
|
||||
<title>DVX</title>
|
||||
<rect width="900" height="810" fill="#000"/>
|
||||
<path fill="#fff" transform="translate(189 308) scale(1.66875)" d="M0 0 L0 116 L107 116 A26 26 0 0 0 133 90 L133 51.62 L185.13 116 L210.98 116 L249 69.85 L286.98 116 L320 116 L320 115.73 L265.26 47.69 L303.96 0 L272.62 0 L248.97 28.69 L225.39 0 L194.03 0 L232.92 48.02 L197.6 91.3 L132.91 12.75 A35 35 0 0 0 105.89 0 Z M25 25 L99 25 A9 9 0 0 1 108 34 L108 82 A9 9 0 0 1 99 91 L25 91 Z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 547 B |
BIN
docs/manual/images/instCopy.png
(Stored with Git LFS)
BIN
docs/manual/images/instCopy.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instDesktop.png
(Stored with Git LFS)
BIN
docs/manual/images/instDesktop.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instDisk.png
(Stored with Git LFS)
BIN
docs/manual/images/instDisk.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instDone.png
(Stored with Git LFS)
BIN
docs/manual/images/instDone.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instFolder.png
(Stored with Git LFS)
BIN
docs/manual/images/instFolder.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instLicence.png
(Stored with Git LFS)
BIN
docs/manual/images/instLicence.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instRemove.png
(Stored with Git LFS)
BIN
docs/manual/images/instRemove.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instSoftware.png
(Stored with Git LFS)
BIN
docs/manual/images/instSoftware.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instStart.png
(Stored with Git LFS)
BIN
docs/manual/images/instStart.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instTour.png
(Stored with Git LFS)
BIN
docs/manual/images/instTour.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instUpgradeFolder.png
(Stored with Git LFS)
BIN
docs/manual/images/instUpgradeFolder.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instUpgradeStart.png
(Stored with Git LFS)
BIN
docs/manual/images/instUpgradeStart.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instUpgradeWhat.png
(Stored with Git LFS)
BIN
docs/manual/images/instUpgradeWhat.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instWelcome.png
(Stored with Git LFS)
BIN
docs/manual/images/instWelcome.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/instWhat.png
(Stored with Git LFS)
BIN
docs/manual/images/instWhat.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/netControlPanel.png
(Stored with Git LFS)
BIN
docs/manual/images/netControlPanel.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgBasicDemo.png
(Stored with Git LFS)
BIN
docs/manual/images/pgBasicDemo.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgClock.png
(Stored with Git LFS)
BIN
docs/manual/images/pgClock.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgDvxDemo.png
(Stored with Git LFS)
BIN
docs/manual/images/pgDvxDemo.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgFileManager.png
(Stored with Git LFS)
BIN
docs/manual/images/pgFileManager.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgHelp.png
(Stored with Git LFS)
BIN
docs/manual/images/pgHelp.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgMediaPlayer.png
(Stored with Git LFS)
BIN
docs/manual/images/pgMediaPlayer.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgNotepad.png
(Stored with Git LFS)
BIN
docs/manual/images/pgNotepad.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgSoundRecorder.png
(Stored with Git LFS)
BIN
docs/manual/images/pgSoundRecorder.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgWelcome.png
(Stored with Git LFS)
BIN
docs/manual/images/pgWelcome.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pgWelcomeTour.png
(Stored with Git LFS)
BIN
docs/manual/images/pgWelcomeTour.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/pmWindow.png
(Stored with Git LFS)
BIN
docs/manual/images/pmWindow.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/tmSecureLink.png
(Stored with Git LFS)
BIN
docs/manual/images/tmSecureLink.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/tmWindow.png
(Stored with Git LFS)
BIN
docs/manual/images/tmWindow.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/trDriveNotReady.png
(Stored with Git LFS)
BIN
docs/manual/images/trDriveNotReady.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/trSafeVideo.png
(Stored with Git LFS)
BIN
docs/manual/images/trSafeVideo.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/trSaveChanges.png
(Stored with Git LFS)
BIN
docs/manual/images/trSaveChanges.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/trTaskManager.png
(Stored with Git LFS)
BIN
docs/manual/images/trTaskManager.png
(Stored with Git LFS)
Binary file not shown.
BIN
docs/manual/images/trWrongDisk.png
(Stored with Git LFS)
BIN
docs/manual/images/trWrongDisk.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/f1-h-progmn.png
(Stored with Git LFS)
BIN
screenshots/86box/f1-h-progmn.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/f1-h-welcom.png
(Stored with Git LFS)
BIN
screenshots/86box/f1-h-welcom.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/hang-ended.png
(Stored with Git LFS)
BIN
screenshots/86box/hang-ended.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/hang-taskmgr.png
(Stored with Git LFS)
BIN
screenshots/86box/hang-taskmgr.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/instadd-su-lic.png
(Stored with Git LFS)
BIN
screenshots/86box/instadd-su-lic.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/instadd-su-what.png
(Stored with Git LFS)
BIN
screenshots/86box/instadd-su-what.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/install-su-lic.png
(Stored with Git LFS)
BIN
screenshots/86box/install-su-lic.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/instbase-su-lic.png
(Stored with Git LFS)
BIN
screenshots/86box/instbase-su-lic.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/midiin-rc-midi.png
(Stored with Git LFS)
BIN
screenshots/86box/midiin-rc-midi.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/pkgsign-ps-plan.png
(Stored with Git LFS)
BIN
screenshots/86box/pkgsign-ps-plan.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/record-rc-open.png
(Stored with Git LFS)
BIN
screenshots/86box/record-rc-open.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/scrpage-text40.png
(Stored with Git LFS)
BIN
screenshots/86box/scrpage-text40.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/scrtest-con1.png
(Stored with Git LFS)
BIN
screenshots/86box/scrtest-con1.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/scrtest-con2.png
(Stored with Git LFS)
BIN
screenshots/86box/scrtest-con2.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/ucide-ucide-ds.png
(Stored with Git LFS)
BIN
screenshots/86box/ucide-ucide-ds.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/upgrade-su-lic.png
(Stored with Git LFS)
BIN
screenshots/86box/upgrade-su-lic.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/upgrade-su-what.png
(Stored with Git LFS)
BIN
screenshots/86box/upgrade-su-what.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/86box/welcome-wl-help.png
(Stored with Git LFS)
BIN
screenshots/86box/welcome-wl-help.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/f1-h-progmn.png
(Stored with Git LFS)
BIN
screenshots/dosbox/f1-h-progmn.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/f1-h-welcom.png
(Stored with Git LFS)
BIN
screenshots/dosbox/f1-h-welcom.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/hang-ended.png
(Stored with Git LFS)
BIN
screenshots/dosbox/hang-ended.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/hang-taskmgr.png
(Stored with Git LFS)
BIN
screenshots/dosbox/hang-taskmgr.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/instadd-su-lic.png
(Stored with Git LFS)
BIN
screenshots/dosbox/instadd-su-lic.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/instadd-su-what.png
(Stored with Git LFS)
BIN
screenshots/dosbox/instadd-su-what.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/install-su-lic.png
(Stored with Git LFS)
BIN
screenshots/dosbox/install-su-lic.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/instbase-su-lic.png
(Stored with Git LFS)
BIN
screenshots/dosbox/instbase-su-lic.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/midiin-rc-midi.png
(Stored with Git LFS)
BIN
screenshots/dosbox/midiin-rc-midi.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/pkgsign-ps-plan.png
(Stored with Git LFS)
BIN
screenshots/dosbox/pkgsign-ps-plan.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/record-rc-open.png
(Stored with Git LFS)
BIN
screenshots/dosbox/record-rc-open.png
(Stored with Git LFS)
Binary file not shown.
BIN
screenshots/dosbox/scrpage-text40.png
(Stored with Git LFS)
BIN
screenshots/dosbox/scrpage-text40.png
(Stored with Git LFS)
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue