diff --git a/WIP.md b/WIP.md
index b448a63e..e96b2986 100644
--- a/WIP.md
+++ b/WIP.md
@@ -122,6 +122,10 @@ Formatting conventions:
- Parameter lists use the deflist `term` + `: definition` indentation pattern (NOT the MS-style markdown table).
- Set `vba_attribution: true` in the frontmatter on any page derived from VBA-Docs; omit it on fully original content (e.g. VB package pages). The flag drives an extra line in the site footer.
+#### Attribution policy
+
+The attribution rule is **per-page**, determined by content provenance β not by package membership. A symbol existing in VBA is not sufficient to require the flag: the twinBASIC page must have been derived (verbatim or paraphrased) from a specific VBA-Docs source page. Many symbols that exist in VBA have no dedicated VBA-Docs page at all, and even where one exists the twinBASIC page may have been written independently. In particular, `VBA/HiddenModule`, `VBA/Compilation`, `VBA/TbExpressionService`, and twinBASIC-specific additions within VBA modules (`CType`, `If`, `CallByDispId`, `RaiseEventByName`, `ObjPtr`, `VarPtr`, `StrPtr`, ...) are twinBASIC-original and correctly omit `vba_attribution: true` regardless of their package location.
+
### Cross-section linking
Relative links resolve against the **rendered URL** (the page's `permalink:`), not the file path. Pages that share a URL folder can use bare names (`[Y](Y)`); crossing folders needs `../` to climb out.
diff --git a/builder/template.mjs b/builder/template.mjs
index 7b97da24..c1bfa2ec 100644
--- a/builder/template.mjs
+++ b/builder/template.mjs
@@ -308,7 +308,7 @@ function renderSidebar(site) {
// fallback footer. The site doesn't override nav_footer_custom.html,
// so the upstream default applies verbatim.
` \n` +
` `;
}
diff --git a/docs/Features/Advanced/Static-Linking.md b/docs/Features/Advanced/Static-Linking.md
index a214cccd..0b5e5e1d 100644
--- a/docs/Features/Advanced/Static-Linking.md
+++ b/docs/Features/Advanced/Static-Linking.md
@@ -49,5 +49,3 @@ Module MainModule
> [!NOTE]
> StdCall names will be mangled with argument sizes, e.g. `int myfunc(int x, short y);` would be `myfunc@6`. It therefore may be better to use `CDecl`.
-
-A documentation page will be dedicated to more fully explaining this in the future; for now if you need help with it, visit the tB Discord or Discussions section of the GitHub repository and ask.
diff --git a/docs/Features/Compiler-IDE/CodeLens.md b/docs/Features/Compiler-IDE/CodeLens.md
index bb53af69..a30f4f17 100644
--- a/docs/Features/Compiler-IDE/CodeLens.md
+++ b/docs/Features/Compiler-IDE/CodeLens.md
@@ -11,3 +11,13 @@ The CodeLens feature allows running Subs and Functions, with no arguments and in
Methods eligible to run with CodeLens (when enabled), have a bar above them that you can click to run:

+
+### Example
+
+A no-argument `Public Sub` in a module is eligible for CodeLens:
+
+```tb
+Public Sub RunTest()
+ Debug.Print "Hello from CodeLens"
+End Sub
+```
diff --git a/docs/Features/Compiler-IDE/Debugging.md b/docs/Features/Compiler-IDE/Debugging.md
index 25f87fe4..10b505b9 100644
--- a/docs/Features/Compiler-IDE/Debugging.md
+++ b/docs/Features/Compiler-IDE/Debugging.md
@@ -15,6 +15,13 @@ New to the debugging experience is a trace logging feature that automatically cr

+```tb
+Public Sub ProcessOrder(ByVal orderId As Long)
+ Debug.TracePrint "ProcessOrder called, orderId=" & CStr(orderId)
+ ' ... processing ...
+End Sub
+```
+
## Stale/Dangling Pointer Detection
Bugs result from using Strings and Variants after they have been freed. It may not be noticed immediately if the memory has not been overwritten, but it's sometimes hard to detect and can cause issues like a String displaying it's previous value or garbage. This debugging option detects use-after-free, and replaces the data with a special symbol indicating the problem.
diff --git a/docs/Features/GUI-Components/Control-Properties.md b/docs/Features/GUI-Components/Control-Properties.md
index 54c348f7..3c4b4333 100644
--- a/docs/Features/GUI-Components/Control-Properties.md
+++ b/docs/Features/GUI-Components/Control-Properties.md
@@ -22,3 +22,15 @@ permalink: /Features/GUI-Components/Control-Properties
## Timer Enhancements
`Timer.Interval` can now be set to any positive `Long` instead of being limited to 65,535.
+
+## Example
+
+```tb
+TextBox1.TextHint = "Enter your name"
+TextBox1.NumbersOnly = True
+
+Label1.Angle = 45
+Label1.LineSpacing = 30
+
+Timer1.Interval = 120000 ' 2 minutes; not limited to 65,535 ms
+```
diff --git a/docs/Features/GUI-Components/UserControl.md b/docs/Features/GUI-Components/UserControl.md
index f0d8b4de..aaca7de9 100644
--- a/docs/Features/GUI-Components/UserControl.md
+++ b/docs/Features/GUI-Components/UserControl.md
@@ -18,3 +18,17 @@ These work with all child windows inside the UserControl, including ones created
## Access to Raw Message Data
You can access raw message data in the `PreKeyDown`/`PreKeyUp` event handlers with the new `PreKeyWParam`/`PreKeyLParam` and `PreKeyTargetHwnd` UserControl properties.
+
+## Example
+
+```tb
+Private Sub UserControl_Initialize()
+ PreKeyEvents = True
+End Sub
+
+Private Sub UserControl_PreKeyDown(KeyCode As Integer, Shift As Integer)
+ If KeyCode = vbKeyTab Then
+ Debug.Print "Tab intercepted; lParam=" & CStr(PreKeyLParam)
+ End If
+End Sub
+```
diff --git a/docs/Features/Language/Comments.md b/docs/Features/Language/Comments.md
index ce17ca90..ff9b0532 100644
--- a/docs/Features/Language/Comments.md
+++ b/docs/Features/Language/Comments.md
@@ -18,3 +18,17 @@ a comment until:
*/
```
+### Example
+
+```tb
+' Single-line comment using the apostrophe
+
+Sub Greet(ByVal name As String /* in */)
+ Debug.Print "Hello, " & name ' inline comment
+ /*
+ This block comment
+ spans multiple lines.
+ */
+End Sub
+```
+
diff --git a/docs/Features/Language/Handlers.md b/docs/Features/Language/Handlers.md
index f873b528..5e0f09a6 100644
--- a/docs/Features/Language/Handlers.md
+++ b/docs/Features/Language/Handlers.md
@@ -13,6 +13,16 @@ You can now separate the name of method from the class member it applies to.
For events on Forms, UserControls, and event-raising objects, you can define any method as the handler, rather than need to name it as `Object_Event()`, by following it with `Handles Object.Event`. For example, in a form, instead of `Private Sub Form_Load()` you could handle the `Load` event with `Private Sub OnLoad() Handles Form.Load`.
+```tb
+Private Sub OnLoad() Handles Form.Load
+ Caption = "Loaded"
+End Sub
+
+Private Sub OnClick() Handles Command1.Click
+ Debug.Print "clicked"
+End Sub
+```
+
## Implements for Interfaces
Similar to the above, for forms/UCs/classes that use `Implements`, you can use `Sub Bar() Implements IFoo.Bar`. Note that you can specify more than one implemented method; for more information, see the [Enhancements to Implements section](Interfaces-CoClasses).
diff --git a/docs/Features/Language/Literals.md b/docs/Features/Language/Literals.md
index 942b5bf5..9d569adb 100644
--- a/docs/Features/Language/Literals.md
+++ b/docs/Features/Language/Literals.md
@@ -16,3 +16,13 @@ In addition to `&H` for hexadecimal literals and `&O` for octal notation, twinBA
## Digit Grouping
The `&H`, `&O`, and `&B` literals can all be grouped using an underscore, for example, grouping a `Long` by it's constituent binary byte groups: `&B10110101_10100011_10000011_01101110`, or grouping a `LongLong` as two `Long` groups: `&H01234567_89ABCDEF`.
+
+## Example
+
+```tb
+Dim flags As Long = &B1010 ' 10 in decimal
+Dim perms As Long = &O17 ' 15 in decimal
+Dim colour As Long = &HFF ' 255 in decimal
+Dim mask As Long = &B10110101_10100011 ' grouped binary bytes
+Dim wide As LongLong = &H01234567_89ABCDEF ' grouped hex halves
+```
diff --git a/docs/Features/Language/Loop-Control.md b/docs/Features/Language/Loop-Control.md
index 208bbe3c..4359494c 100644
--- a/docs/Features/Language/Loop-Control.md
+++ b/docs/Features/Language/Loop-Control.md
@@ -13,3 +13,15 @@ The following new statements are available for controlling the procession of loo
- `Continue While` - Proceed to the next iteration (or end) of `While` loop.
- `Continue Do` - Proceed to the next iteration of `Do` loop.
- `Exit While` - Exit a `While` loop immediately.
+
+## Example
+
+```tb
+Dim i As Long
+For i = 1 To 10
+ If i Mod 2 = 0 Then Continue For ' skip even numbers
+ If i > 7 Then Exit For ' stop before reaching 8
+ Debug.Print i
+Next
+' prints: 1, 3, 5, 7
+```
diff --git a/docs/Features/Language/Operators.md b/docs/Features/Language/Operators.md
index c8687e7b..dbe3d760 100644
--- a/docs/Features/Language/Operators.md
+++ b/docs/Features/Language/Operators.md
@@ -34,3 +34,19 @@ These are the equivalent of `var = var (operand) (var2)`. So `i += 1` is the equ
The logical opposite of the [`Is`](../../tB/Core/Is) operator for testing object equivalence. For example, instead of `If (object Is Nothing) = False` you could now write `If object `[`IsNot`](../../tB/Core/IsNot)` Nothing Then`.
+## Examples
+
+```tb
+Dim n As Long = &HFF
+Dim shifted As Long = n << 4 ' result: &HFF0
+
+n += 1 ' compound assignment: n = &H100
+n <<= 2 ' left-shift assignment: n = &H400
+
+Dim obj As Object = Nothing
+If obj IsNot Nothing Then Debug.Print obj
+
+Dim x As Long = -5
+Debug.Print If(x >= 0, x, -x) ' short-circuit If(): prints 5
+```
+
diff --git a/docs/Features/Language/Type-Inference.md b/docs/Features/Language/Type-Inference.md
index da09d585..b45e4181 100644
--- a/docs/Features/Language/Type-Inference.md
+++ b/docs/Features/Language/Type-Inference.md
@@ -13,6 +13,12 @@ Variables can now be declared `As Any` and their type will be inferred, similar
`Dim x As Any = 5&` would result in x being a `Long`.
+```tb
+Dim x As Any = 5& ' x is inferred as Long
+Dim s As Any = "hello" ' s is inferred as String
+Dim b As Any = True ' b is inferred as Boolean
+```
+
## Limitations
This is only for the `Dim` statement; arguments cannot be `As Any` except in API declarations.
diff --git a/docs/Features/Packages/index.md b/docs/Features/Packages/index.md
index 400c902a..9cd808ec 100644
--- a/docs/Features/Packages/index.md
+++ b/docs/Features/Packages/index.md
@@ -20,4 +20,12 @@ With TWINPACK packages you group common components together into their own names
Please be aware that TWINPACK files currently contain the full source code of your packaged components. It is planned that we will in future allow for creating binary (compiled) TWINPACK files for developers that hold an Ultimate edition licence of twinBASIC.
+## Topics
+
+- [Creating a TWINPACK Package](Creating-TWINPACK) -- packaging twinBASIC components into a distributable TWINPACK file.
+- [Importing a Package from TWINSERV](Importing-TWINSERV) -- browsing and installing packages from the TWINSERV online repository.
+- [Importing a Package from a TWINPACK File](Importing-TWINPACK) -- installing a package from a local TWINPACK file.
+- [Linked Packages](Linked) -- storing a package in a shared location rather than embedding it in each project file.
+- [Updating a Package](Updating) -- removing an outdated package and installing a newer version from TWINSERV.
+
[^1]: A service of TWINBASIC LTD offered to the user community.
diff --git a/docs/Features/Project-Configuration/Compiler-Options.md b/docs/Features/Project-Configuration/Compiler-Options.md
index 6121448a..c8951cd5 100644
--- a/docs/Features/Project-Configuration/Compiler-Options.md
+++ b/docs/Features/Project-Configuration/Compiler-Options.md
@@ -19,7 +19,7 @@ You can adjust the following parameters: Max Size Raw, Max Size Lookup, and Data
## Boolean Type Sanitization
-Under the hood, a Boolean is a 2-byte type. With memory APIs, or when receiving these from outside code, it's possible to store values other than the ones representing `True` and `False`. This option validates Booleans from external sources, e.g. COM objects and APIs, to ensure only the two supported values are stored.
+Internally, a Boolean is a 2-byte type. With memory APIs, or when receiving these from outside code, it's possible to store values other than the ones representing `True` and `False`. This option validates Booleans from external sources, e.g. COM objects and APIs, to ensure only the two supported values are stored.
## Additional Options
diff --git a/docs/Features/Project-Configuration/Project-Types.md b/docs/Features/Project-Configuration/Project-Types.md
index 7e987732..34318908 100644
--- a/docs/Features/Project-Configuration/Project-Types.md
+++ b/docs/Features/Project-Configuration/Project-Types.md
@@ -15,6 +15,18 @@ While it was possible to accomplish this via hacks previously, tB offers it as a
Standard DLLs in twinBASIC can still specify a startup point; each export will then check if this code has run yet, and if not, run it.
+```tb
+[DllExport]
+Public Function Add(ByVal a As Long, ByVal b As Long) As Long
+ Add = a + b
+End Function
+
+[DllExport]
+Public Function Multiply CDecl(ByVal a As Long, ByVal b As Long) As Long
+ Multiply = a * b
+End Function
+```
+
## Console Applications
This project type allows making a true console project rather than a GUI project. Helpfully, it will also add a default `Console` class for reading/writing console IO and provided debug console.
diff --git a/docs/IDE/AddIns/index.md b/docs/IDE/AddIns/index.md
index 419d8f44..f7a73dca 100644
--- a/docs/IDE/AddIns/index.md
+++ b/docs/IDE/AddIns/index.md
@@ -6,7 +6,13 @@ permalink: /tB/IDE/AddIns/
# Add Ins
-To install addins in twinBASIC, just unzip and copy each architecture dll in the corresponding folder:
+An addin is a Standard DLL that exports `tbCreateCompilerAddin` and returns an object implementing the [**AddIn**](../../Packages/tbIDE/AddIn) interface. Through the [**Host**](../../Packages/tbIDE/Host) object the IDE passes at startup, an addin can reach the toolbar, tool windows, debug console, current project, keyboard shortcuts, and themes. The [**tbIDE package**](../../Packages/tbIDE/) documents the full API.
+
+The New Project dialog includes addin templates (samples 10 through 16), covering patterns from simple toolbar buttons to HTML DOM-backed tool windows. Community addins are listed on the [**Community**](Community) page.
+
+twinBASIC supports two addin install locations. The IDE install directory is available to all user accounts on the machine but may require reinstallation after an IDE update. A per-user application data folder persists across IDE upgrades and requires no administrator rights.
+
+To install an addin via the IDE install directory, unzip and copy each architecture DLL to the matching folder:
`\twinBASIC_IDE_BETA_xxx\addins\win32\`
diff --git a/docs/IDE/Call Stack.md b/docs/IDE/Call Stack.md
index 6ae10e66..fea05d02 100644
--- a/docs/IDE/Call Stack.md
+++ b/docs/IDE/Call Stack.md
@@ -8,3 +8,5 @@ permalink: /tB/IDE/Project/CallStack
# Call Stack

+
+The Call Stack pane lists the active chain of procedure calls at the current execution point during a debugging session, with the most recent call at the top. Clicking an entry in the list navigates the editor to that call site.
diff --git a/docs/IDE/Debug Console.md b/docs/IDE/Debug Console.md
index 19809f82..17337996 100644
--- a/docs/IDE/Debug Console.md
+++ b/docs/IDE/Debug Console.md
@@ -9,6 +9,8 @@ permalink: /tB/IDE/Project/DebugConsole

+The Debug Console captures output from `Debug.Print` statements and other debug-layer messages written at runtime, displaying them in a scrollable log.
+
##  Auto Scroll
##  Clear Debug Console
diff --git a/docs/IDE/Memory.md b/docs/IDE/Memory.md
index fec964d3..b64fb145 100644
--- a/docs/IDE/Memory.md
+++ b/docs/IDE/Memory.md
@@ -8,3 +8,5 @@ permalink: /tB/IDE/Project/Memory
# Memory

+
+The Memory pane displays the raw contents of process memory during a paused debugging session, with addresses in the left column and byte values on the right. It is useful for inspecting data structures at the byte level.
diff --git a/docs/IDE/Menu/Add-Ins.md b/docs/IDE/Menu/Add-Ins.md
index fadae9b5..a927ca01 100644
--- a/docs/IDE/Menu/Add-Ins.md
+++ b/docs/IDE/Menu/Add-Ins.md
@@ -18,6 +18,6 @@ Once you open a project:
Clicking on this menu option shows
-> π Sorry, this menu option has not been imlpemented yet
+> π Sorry, this menu option has not been implemented yet

diff --git a/docs/IDE/Menu/Debug.md b/docs/IDE/Menu/Debug.md
index 9d1b4efb..103329ad 100644
--- a/docs/IDE/Menu/Debug.md
+++ b/docs/IDE/Menu/Debug.md
@@ -17,7 +17,7 @@ permalink: /tB/IDE/Project/Menu/Debug
- Clear Watches
---
- Toggle Breakpoint F9
-- Clear Al Breakpoints CTRL + SHIFT + F9
+- Clear All Breakpoints CTRL + SHIFT + F9
---
- Set Next Statement (Jump To Line) CTRL + F9
---
diff --git a/docs/IDE/Menu/File.md b/docs/IDE/Menu/File.md
index f0b99eac..d381ff4c 100644
--- a/docs/IDE/Menu/File.md
+++ b/docs/IDE/Menu/File.md
@@ -25,7 +25,3 @@ permalink: /tB/IDE/Project/Menu/File
- Clean
---
- Exit ALT + F4
-
-> [!NOTE]
->
-> TODO: Add each Menu item.
diff --git a/docs/IDE/Menu/Format.md b/docs/IDE/Menu/Format.md
index 998ceeba..58031544 100644
--- a/docs/IDE/Menu/Format.md
+++ b/docs/IDE/Menu/Format.md
@@ -18,7 +18,7 @@ permalink: /tB/IDE/Project/Menu/Format
- Vertical Spacing
---
- Center In Container (Horizontally)
-- Center In Container (Horizontally)
+- Center In Container (Vertically)
---
- Bring To Front
- Send To Back
diff --git a/docs/IDE/Menu/Help.md b/docs/IDE/Menu/Help.md
index 5e198233..423fd4b9 100644
--- a/docs/IDE/Menu/Help.md
+++ b/docs/IDE/Menu/Help.md
@@ -24,10 +24,6 @@ permalink: /tB/IDE/Project/Menu/Help
---
- Compiler services TRACE mode: Disabled
-> [!NOTE]
->
-> TODO: Add each Help Menu item.
-
## About twinBASIC...

diff --git a/docs/IDE/Open Editors.md b/docs/IDE/Open Editors.md
index da8bb422..d986fb35 100644
--- a/docs/IDE/Open Editors.md
+++ b/docs/IDE/Open Editors.md
@@ -14,3 +14,5 @@ When a project isn't open this will be empty.
When a project is open it will list the files that are currently open in your [Editor](Editor)

+
+Clicking a file in the list brings it into focus in the editor.
diff --git a/docs/IDE/Outline.md b/docs/IDE/Outline.md
index 0b7ea2f9..c1927810 100644
--- a/docs/IDE/Outline.md
+++ b/docs/IDE/Outline.md
@@ -7,6 +7,8 @@ permalink: /tB/IDE/Project/Outline
# Outline
+The Outline pane shows a structural overview of the declarations in the active source file---modules, classes, procedures, and properties.
+
When a project isn't open this will be empty.

diff --git a/docs/IDE/Package Publishing.md b/docs/IDE/Package Publishing.md
index d91d6e50..7d00db43 100644
--- a/docs/IDE/Package Publishing.md
+++ b/docs/IDE/Package Publishing.md
@@ -7,6 +7,8 @@ permalink: /tB/IDE/Project/PackagePublishing
# Package Publishing
+The Package Publishing pane manages the metadata for the current project when it is published as a twinBASIC package, including the package name, version, and description.
+
When a project isn't open this will be empty.

diff --git a/docs/IDE/Project Explorer.md b/docs/IDE/Project Explorer.md
index a697c48e..3c1ac3e2 100644
--- a/docs/IDE/Project Explorer.md
+++ b/docs/IDE/Project Explorer.md
@@ -32,10 +32,6 @@ When a Project is open contextual icons will appear.
Same as Right-Click
-> [!NOTE]
->
-> TODO: Add each Menu item.
-
## Right-Click - Add

diff --git a/docs/IDE/Properties.md b/docs/IDE/Properties.md
index 15d10041..68fa2120 100644
--- a/docs/IDE/Properties.md
+++ b/docs/IDE/Properties.md
@@ -8,3 +8,5 @@ permalink: /tB/IDE/Project/Properties
# Properties

+
+The Properties pane shows the properties of the control or object currently selected in the form designer. Property names appear in the left column with their current values on the right; clicking a value edits it in place.
diff --git a/docs/IDE/Splash Screen.md b/docs/IDE/Splash Screen.md
index 09d336dc..64b16dcc 100644
--- a/docs/IDE/Splash Screen.md
+++ b/docs/IDE/Splash Screen.md
@@ -8,3 +8,5 @@ permalink: /tB/IDE/Project/Splash
# Splash Screen

+
+The Splash Screen appears each time the IDE starts and displays the current twinBASIC version number, build date, and links to community resources. It closes automatically once the IDE finishes loading.
diff --git a/docs/IDE/Status Bar.md b/docs/IDE/Status Bar.md
index 25beaf61..0d97efbb 100644
--- a/docs/IDE/Status Bar.md
+++ b/docs/IDE/Status Bar.md
@@ -9,6 +9,8 @@ permalink: /tB/IDE/Project/StatusBar

+The Status Bar runs along the bottom of the IDE window and shows at-a-glance information about the health of backend services, the active licence tier, and quick-access links to community resources.
+
## Services

diff --git a/docs/IDE/Toolbox.md b/docs/IDE/Toolbox.md
index 4e7651eb..314863f1 100644
--- a/docs/IDE/Toolbox.md
+++ b/docs/IDE/Toolbox.md
@@ -7,6 +7,8 @@ permalink: /tB/IDE/Project/Toolbox
# Toolbox
+The Toolbox lists the controls available for placement on forms and designers in the current project. Additional COM components can be added through the **+ More Components** button, which opens the COM References section of Project Settings.
+
See [Controls](../../Controls)
diff --git a/docs/IDE/Variables.md b/docs/IDE/Variables.md
index 6c53509f..ae51466b 100644
--- a/docs/IDE/Variables.md
+++ b/docs/IDE/Variables.md
@@ -8,3 +8,5 @@ permalink: /tB/IDE/Project/Variables
# Variables

+
+The Variables pane lists the variables in scope at the current execution point during debugging, showing each variable's name, type, and current value. Structured types---classes and user-defined types---can be expanded to inspect their individual members.
diff --git a/docs/IDE/Webpage.md b/docs/IDE/Webpage.md
index 5fa9327c..9b439fe9 100644
--- a/docs/IDE/Webpage.md
+++ b/docs/IDE/Webpage.md
@@ -8,3 +8,5 @@ permalink: /tB/IDE/Project/Webpage
# Webpage

+
+The Webpage pane embeds a web browser view inside the IDE. It is used to display online content---such as documentation or release notes---without opening an external browser.
diff --git a/docs/IDE/index.md b/docs/IDE/index.md
index 3f1720af..ad13fc03 100644
--- a/docs/IDE/index.md
+++ b/docs/IDE/index.md
@@ -7,3 +7,9 @@ permalink: /tB/IDE
# The twinBASIC IDE

+
+The IDE consists of several fixed panes and tool windows. The [**Project Explorer**](IDE/Project/Explorer) shows the file tree of the open project; the [**Editor**](IDE/Project/Editor) is the main code and designer surface; the [**Properties**](IDE/Project/Properties) pane shows and edits properties for the selected item; the [**Toolbox**](IDE/Project/Toolbox) lists the controls available to drop onto a form.
+
+The debug tool windows --- [**Call Stack**](IDE/Project/CallStack), [**Watches**](IDE/Project/Watches), [**Variables**](IDE/Project/Variables), [**Debug Console**](IDE/Project/DebugConsole), [**Diagnostics**](IDE/Project/Diagnostics), [**Outline**](IDE/Project/Outline), and [**Memory**](IDE/Project/Memory) --- open during a debug session.
+
+The [**tbForm**](IDE/Project/Editor/Form) and [**tbReport**](IDE/Project/Editor/Report) designers open when a form or report file is selected in the Project Explorer. Third-party and community [**addins**](IDE/AddIns/) extend the IDE with additional commands and tool windows.
diff --git a/docs/Reference/Categories.md b/docs/Reference/Categories.md
index c5ad2fbf..19961367 100644
--- a/docs/Reference/Categories.md
+++ b/docs/Reference/Categories.md
@@ -7,9 +7,6 @@ permalink: /Reference/Categories
This chapter lists the global statements and procedures that form the core of the twinBASIC language.
-> [!WARNING]
-> Work in Progress Below
-
# Categorical List
## Compiler Control
diff --git a/docs/Reference/Core/Event.md b/docs/Reference/Core/Event.md
index 84d8b748..5f69d718 100644
--- a/docs/Reference/Core/Event.md
+++ b/docs/Reference/Core/Event.md
@@ -3,6 +3,8 @@ title: Event
parent: Statements
permalink: /tB/Core/Event
---
+# Event
+{: .no_toc }
Declares a user-defined event.
diff --git a/docs/Reference/Data-Types.md b/docs/Reference/Data-Types.md
new file mode 100644
index 00000000..03efeaa2
--- /dev/null
+++ b/docs/Reference/Data-Types.md
@@ -0,0 +1,122 @@
+---
+title: Data Types
+parent: Reference Section
+nav_order: 10
+has_toc: false
+permalink: /Reference/Data-Types
+---
+
+# Data Types
+
+twinBASIC supports fourteen intrinsic data types. They fall into four broad categories: numeric (integer and floating-point), text, date/time, and reference/generic. This page is the canonical lookup for storage size, value range, and the type-declaration suffix where one exists.
+
+For the twinBASIC-specific additions to this set --- **LongLong**, **LongPtr**, and **Decimal** as a standalone type --- see [Features β New Data Types](../Features/Language/Data-Types).
+
+---
+
+## Quick reference
+
+| Type | Suffix | Storage | Range |
+|------|--------|---------|-------|
+| **Boolean** | (none) | 2 bytes | `True` or `False` |
+| **Byte** | (none) | 1 byte | 0 to 255 |
+| **Integer** | `%` | 2 bytes | -32,768 to 32,767 |
+| **Long** | `&` | 4 bytes | -2,147,483,648 to 2,147,483,647 |
+| **LongLong** | `^` | 8 bytes | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
+| **LongPtr** | (none) | 4 bytes (32-bit) / 8 bytes (64-bit) | Same as **Long** or **LongLong** depending on target |
+| **Single** | `!` | 4 bytes | Β±1.401298E-45 to Β±3.402823E38 |
+| **Double** | `#` | 8 bytes | Β±4.94065645841246E-324 to Β±1.79769313486232E308 |
+| **Currency** | `@` | 8 bytes | -922,337,203,685,477.5808 to 922,337,203,685,477.5807 |
+| **Decimal** | (none) | 16 bytes | Β±79,228,162,514,264,337,593,543,950,335 (up to 28 decimal places) |
+| **Date** | (none) | 8 bytes | January 1, 100 to December 31, 9999 |
+| **String** | `$` | variable | Up to ~2 billion characters |
+| **Variant** | (none) | 16 bytes (+ heap data) | Any of the above |
+| **Object** | (none) | 4 bytes (32-bit) / 8 bytes (64-bit) | A COM interface reference |
+
+The suffix column lists the character that can optionally follow a literal or identifier to force its type in source code --- for example, `42&` is a **Long** literal, `3.14#` is a **Double**, and `Total!` declares a **Single** variable in a type-implicit context.
+
+---
+
+## Integer types
+
+**Boolean** stores `True` (-1) or `False` (0). The runtime treats any non-zero value as `True` when a **Boolean** is expected; only -1 is the canonical `True`. Assigning any non-zero integer to a **Boolean** normalises it to -1.
+
+**Byte** is the only unsigned integer type. It holds values 0--255, which makes it the natural element type for byte arrays used in binary I/O and buffer operations.
+
+**Integer** holds small signed integers. In most code, **Long** is a better choice: it is no slower on 32-bit hardware and never overflows on values above 32,767. **Integer** is useful when interfacing with structures or APIs that declare 16-bit fields.
+
+**Long** is the most common integer type. It covers the full range of Win32 `DWORD` and `int` values and is the default type for index variables and counters.
+
+**LongLong** is an 8-byte signed integer available in both 32-bit and 64-bit builds. In VBA it is restricted to 64-bit targets; twinBASIC lifts that restriction and allows **LongLong** in 32-bit projects. Use it when a value can exceed 2,147,483,647 --- file sizes, tick counts, GUIDs, and 64-bit Win32 handles. The suffix `^` marks a **LongLong** literal: `9_000_000_000^`.
+
+**LongPtr** changes width with the compilation target: 4 bytes in a 32-bit build, 8 bytes in a 64-bit build. It is the correct type for Win32 handles, window handles (**HWND**), and pointers in `Declare` statements that must work in both modes. It has no literal suffix --- declare the variable with `Dim x As LongPtr` and assign it a numeric expression.
+
+Integer overflow raises a run-time error (error 6) by default. Overflow does not wrap silently.
+
+---
+
+## Floating-point types
+
+**Single** and **Double** follow the IEEE 754 standard for single-precision and double-precision floating-point respectively. Both can represent `NaN` and `Infinity` as bit patterns, though the VBA runtime raises an error on most operations that would produce them.
+
+**Double** is the default type of untyped numeric literals that contain a decimal point (`3.14` is a **Double**). It is accurate to approximately 15--16 significant decimal digits. Choose it for general-purpose floating-point arithmetic.
+
+**Single** is accurate to approximately 6--7 significant decimal digits. It is smaller and may be faster in tight loops, but the reduced precision makes it unsuitable for financial or scientific calculations where rounding error matters.
+
+**Currency** is a fixed-point type, stored internally as a 64-bit signed integer scaled by 10,000. It avoids the binary rounding errors of IEEE 754 types and carries exactly four decimal places. Use it for monetary values and any calculation where exact decimal rounding is required.
+
+---
+
+## Decimal
+
+**Decimal** is a 16-byte type using a 12-byte (96-bit) integer with a variable decimal-point scale and a sign bit. It provides up to 29 significant digits and up to 28 decimal places, making it the highest-precision numeric type available.
+
+> [!NOTE]
+> In twinBASIC, **Decimal** is available both as a **Variant** subtype (as in VBA) and as a standalone declared type --- `Dim x As Decimal` compiles and runs. The conversion function [**CDec**](../tB/Modules/Conversion/CDec) returns a **Decimal** value.
+
+---
+
+## Date
+
+**Date** is stored as an IEEE 754 double: the integer part counts days from the epoch (December 30, 1899), and the fractional part represents the time of day (0.0 at midnight, 0.5 at noon). The representable range is January 1, 100 to December 31, 9999.
+
+The [**Date**](../tB/Core/Date) and [**Time**](../tB/Core/Time) properties return the current date and time. [**Now**](../tB/Modules/DateTime/Now) returns both combined. Because **Date** is ultimately a **Double**, arithmetic on **Date** values works: adding 1 advances by one day, subtracting two dates gives the number of days between them.
+
+---
+
+## String
+
+**String** holds a sequence of Unicode characters, stored internally as a COM `BSTR` (a length-prefixed wide-character string). The length is measured in characters, not bytes; each character is 2 bytes wide (UTF-16 LE). A **String** can hold up to approximately 2 billion characters, limited in practice by available memory.
+
+A **String** variable initialises to `vbNullString` (a null `BSTR` pointer), which is distinct from a zero-length string (`""`). Most string operations treat both as empty, but the distinction matters when passing strings to APIs that distinguish a null pointer from an empty buffer. See [**StrPtr**](../tB/Modules/Information/StrPtr) for the address of the underlying buffer.
+
+Fixed-length strings --- `Dim s As String * 20` --- occupy exactly the specified number of characters, padded with spaces on the right or truncated on assignment. They are useful for fixed-width binary file records.
+
+---
+
+## Variant
+
+**Variant** is a tagged union that can hold any of the types in the table above, plus `Null`, `Empty`, and arrays. Its 16-byte header stores a type tag ([**VbVarType**](../tB/Modules/Constants/VbVarType)) followed by type-specific data. When the value is a **String**, **Object**, or array, the 8-byte data slot holds a pointer to heap-allocated storage.
+
+`Empty` is the default state of an uninitialised **Variant** --- it is distinct from `0`, `""`, `False`, and `Null`. Test for it with [**IsEmpty**](../tB/Modules/Information/IsEmpty). `Null` propagates through arithmetic and comparison; use [**IsNull**](../tB/Modules/Information/IsNull) to detect it.
+
+**Variant** is the required type for parameters and return values in late-bound COM calls, and for any function whose return type varies at runtime. It carries a small overhead on each operation compared to a typed variable because the runtime must check the tag. Prefer typed variables when the type is known at design time.
+
+---
+
+## Object
+
+**Object** holds a COM interface reference --- a pointer to a vtable. In a 32-bit build it occupies 4 bytes; in a 64-bit build, 8 bytes. The runtime calls `AddRef` on assignment and `Release` when the variable goes out of scope or is set to `Nothing`.
+
+`Nothing` is the zero-valued **Object** reference. Test for it with `If obj Is Nothing Then`.
+
+An **Object** variable can hold any COM-compatible object; the runtime resolves member calls through `IDispatch` (late binding). Declaring the variable with a specific class or interface type --- `Dim fs As FileSystemObject` --- enables early binding, which is faster and produces compile-time type checking.
+
+---
+
+### See Also
+
+- [New Data Types](../Features/Language/Data-Types) -- **LongLong**, **LongPtr**, and **Decimal** in depth
+- [Enumerations](Enumerations) -- index of all enumeration types across all packages
+- [VbVarType](../tB/Modules/Constants/VbVarType) -- **Variant** subtype tag constants
+- [CDec](../tB/Modules/Conversion/CDec), [CLngLng](../tB/Modules/Conversion/CLngLng), [CLngPtr](../tB/Modules/Conversion/CLngPtr) -- conversion functions for the three extended numeric types
diff --git a/docs/Reference/Enumerations.md b/docs/Reference/Enumerations.md
new file mode 100644
index 00000000..a1c2aeb5
--- /dev/null
+++ b/docs/Reference/Enumerations.md
@@ -0,0 +1,405 @@
+---
+title: Enumerations
+parent: Reference Section
+nav_order: 9
+has_toc: false
+permalink: /Reference/Enumerations
+---
+
+# Enumerations
+
+An *enumeration* defines a named set of integer constants. Passing an enum member instead of a bare integer makes call sites self-documenting and allows the IDE to offer completion for the valid values. Each built-in package groups its enumerations under a dedicated sub-folder; this page indexes all of them.
+
+The sections below list enumerations [by package](#by-package), followed by an [alphabetical index](#alphabetical-index).
+
+---
+
+## By package
+
+### VBA Package
+
+Fifteen enumerations covering window styles, comparison modes, message-box options, variable types, date and time constants, file attributes, and more.
+
+- [**VbAppWinStyle**](../tB/Modules/Constants/VbAppWinStyle) -- window-style values for the *windowstyle* argument of [**Shell**](../tB/Modules/Interaction/Shell)
+- [**VbArchitecture**](../tB/Modules/Constants/VbArchitecture) -- processor-architecture values returned by [**ProcessorArchitecture**](../tB/Modules/Compilation/ProcessorArchitecture)
+- [**VbCalendar**](../tB/Modules/Constants/VbCalendar) -- calendar-type values for the [**Calendar**](../tB/Core/Calendar) property
+- [**VbCallType**](../tB/Modules/Constants/VbCallType) -- procedure-call type flags for **CallByName**
+- [**VbCompareMethod**](../tB/Modules/Constants/VbCompareMethod) -- text-comparison modes for [**InStr**](../tB/Modules/Strings/InStr), [**Replace**](../tB/Modules/Strings/Replace), [**Split**](../tB/Modules/Strings/Split), and similar
+- [**VbDateTimeFormat**](../tB/Modules/Constants/VbDateTimeFormat) -- format codes for [**FormatDateTime**](../tB/Modules/Strings/FormatDateTime)
+- [**VbDayOfWeek**](../tB/Modules/Constants/VbDayOfWeek) -- day-of-week constants for [**DateAdd**](../tB/Modules/DateTime/DateAdd), [**DateDiff**](../tB/Modules/DateTime/DateDiff), [**Weekday**](../tB/Modules/DateTime/Weekday), and similar
+- [**VbFileAttribute**](../tB/Modules/Constants/VbFileAttribute) -- attribute flags for [**Dir**](../tB/Modules/FileSystem/Dir), [**GetAttr**](../tB/Modules/FileSystem/GetAttr), and [**SetAttr**](../tB/Modules/FileSystem/SetAttr)
+- [**VbFirstWeekOfYear**](../tB/Modules/Constants/VbFirstWeekOfYear) -- first-week-of-year selectors for [**DateDiff**](../tB/Modules/DateTime/DateDiff), [**DatePart**](../tB/Modules/DateTime/DatePart), and [**Weekday**](../tB/Modules/DateTime/Weekday)
+- [**VbIMEStatus**](../tB/Modules/Constants/VbIMEStatus) -- Input Method Editor mode constants
+- [**VbMsgBoxResult**](../tB/Modules/Constants/VbMsgBoxResult) -- identifies the button clicked in a [**MsgBox**](../tB/Modules/Interaction/MsgBox) dialog
+- [**VbMsgBoxStyle**](../tB/Modules/Constants/VbMsgBoxStyle) -- buttons, icons, modality, and other flags for [**MsgBox**](../tB/Modules/Interaction/MsgBox)
+- [**VbStrConv**](../tB/Modules/Constants/VbStrConv) -- conversion-type flags for [**StrConv**](../tB/Modules/Strings/StrConv)
+- [**VbTriState**](../tB/Modules/Constants/VbTriState) -- three-state values for formatting functions such as [**FormatNumber**](../tB/Modules/Strings/FormatNumber) and [**FormatCurrency**](../tB/Modules/Strings/FormatCurrency)
+- [**VbVarType**](../tB/Modules/Constants/VbVarType) -- Variant subtype codes returned by [**VarType**](../tB/Modules/Information/VarType)
+
+### VBRUN Package
+
+Eighty-six enumerations covering every aspect of classic VB6 controls and forms --- alignment, border styles, colours, drag-and-drop, OLE container options, printer settings, window states, and more.
+
+- [**AlignConstants**](../tB/Packages/VBRUN/Constants/AlignConstants) -- **Align** property values for picture boxes, toolbars, and data controls
+- [**AlignmentConstants**](../tB/Packages/VBRUN/Constants/AlignmentConstants) -- text alignment for label, text-box, and option-button controls
+- [**AlignmentConstantsNoCenter**](../tB/Packages/VBRUN/Constants/AlignmentConstantsNoCenter) -- left/right alignment values where centre is not available
+- [**AppearanceConstants**](../tB/Packages/VBRUN/Constants/AppearanceConstants) -- drawing style for the **Appearance** property
+- [**ApplicationStartConstants**](../tB/Packages/VBRUN/Constants/ApplicationStartConstants) -- standalone vs. Automation-invoked start-up mode
+- [**AspectTypeConstants**](../tB/Packages/VBRUN/Constants/AspectTypeConstants) -- OLE rendering aspect identifiers for **DataObjectFormat**
+- [**AsyncReadConstants**](../tB/Packages/VBRUN/Constants/AsyncReadConstants) -- flags for the *AsyncReadOptions* argument of **UserControl.AsyncRead**
+- [**AsyncStatusCodeConstants**](../tB/Packages/VBRUN/Constants/AsyncStatusCodeConstants) -- status codes reported during **AsyncReadProgress**
+- [**AsyncTypeConstants**](../tB/Packages/VBRUN/Constants/AsyncTypeConstants) -- data kind delivered by **UserControl.AsyncRead**
+- [**BackFillStyleConstants**](../tB/Packages/VBRUN/Constants/BackFillStyleConstants) -- opaque vs. transparent background fill
+- [**BorderStyleConstants**](../tB/Packages/VBRUN/Constants/BorderStyleConstants) -- line style for the **BorderStyle** property of Shape and Line controls
+- [**ButtonConstants**](../tB/Packages/VBRUN/Constants/ButtonConstants) -- style for command buttons with optional image-based appearance
+- [**CheckBoxConstants**](../tB/Packages/VBRUN/Constants/CheckBoxConstants) -- state values for the check-box **Value** property
+- [**ClipboardConstants**](../tB/Packages/VBRUN/Constants/ClipboardConstants) -- clipboard format identifiers for **DataObject** and **Clipboard**
+- [**ColorConstants**](../tB/Packages/VBRUN/Constants/ColorConstants) -- common named RGB colours
+- [**ComboBoxConstants**](../tB/Packages/VBRUN/Constants/ComboBoxConstants) -- style values for the combo-box **Style** property
+- [**ControlBorderStyleConstants**](../tB/Packages/VBRUN/Constants/ControlBorderStyleConstants) -- border style for text boxes, picture boxes, and labels
+- [**ControlBorderStyleConstantsCustom**](../tB/Packages/VBRUN/Constants/ControlBorderStyleConstantsCustom) -- extended border style including custom-drawn borders
+- [**ControlTypeConstants**](../tB/Packages/VBRUN/Constants/ControlTypeConstants) -- identifiers for standard intrinsic control types
+- [**DatabaseTypeConstants**](../tB/Packages/VBRUN/Constants/DatabaseTypeConstants) -- database engine for the **DefaultType** property of a Data control
+- [**DataBOFconstants**](../tB/Packages/VBRUN/Constants/DataBOFconstants) -- action when the user moves past the start of a recordset
+- [**DataEOFConstants**](../tB/Packages/VBRUN/Constants/DataEOFConstants) -- action when the user moves past the end of a recordset
+- [**DataErrorConstants**](../tB/Packages/VBRUN/Constants/DataErrorConstants) -- response values for the Data control's **Error** event
+- [**DataValidateConstants**](../tB/Packages/VBRUN/Constants/DataValidateConstants) -- action codes in the **Validate** event
+- [**DefaultCursorTypeConstants**](../tB/Packages/VBRUN/Constants/DefaultCursorTypeConstants) -- cursor-driver for the Data control's connection
+- [**DockModeConstants**](../tB/Packages/VBRUN/Constants/DockModeConstants) -- dock-edge values for forms and toolbars
+- [**DragConstants**](../tB/Packages/VBRUN/Constants/DragConstants) -- action values for the **Drag** method
+- [**DragModeConstants**](../tB/Packages/VBRUN/Constants/DragModeConstants) -- automatic vs. manual drag-mode for controls
+- [**DragOverConstants**](../tB/Packages/VBRUN/Constants/DragOverConstants) -- state values in the **DragOver** event
+- [**DrawModeConstants**](../tB/Packages/VBRUN/Constants/DrawModeConstants) -- GDI raster-operation values for the **DrawMode** property
+- [**DrawStyleConstants**](../tB/Packages/VBRUN/Constants/DrawStyleConstants) -- line style for the **DrawStyle** property
+- [**FillStyleConstants**](../tB/Packages/VBRUN/Constants/FillStyleConstants) -- fill pattern for the **FillStyle** property
+- [**FillStyleConstantsEx**](../tB/Packages/VBRUN/Constants/FillStyleConstantsEx) -- extended fill patterns including gradient fills
+- [**FormArrangeConstants**](../tB/Packages/VBRUN/Constants/FormArrangeConstants) -- arrangement modes for the MDI **Arrange** method
+- [**FormBorderStyleConstants**](../tB/Packages/VBRUN/Constants/FormBorderStyleConstants) -- border and frame style for the form's **BorderStyle** property
+- [**FormShowConstants**](../tB/Packages/VBRUN/Constants/FormShowConstants) -- modality values for the *Modal* argument of **Show**
+- [**FormWindowStateConstants**](../tB/Packages/VBRUN/Constants/FormWindowStateConstants) -- window-state values for a form's **WindowState** property
+- [**HitResultConstants**](../tB/Packages/VBRUN/Constants/HitResultConstants) -- return values from a **UserControl**'s **HitTest** event
+- [**KeyCodeConstants**](../tB/Packages/VBRUN/Constants/KeyCodeConstants) -- virtual-key codes for **KeyDown** and **KeyUp** events
+- [**LinkModeConstants**](../tB/Packages/VBRUN/Constants/LinkModeConstants) -- DDE link-mode values for the **LinkMode** property
+- [**ListBoxConstants**](../tB/Packages/VBRUN/Constants/ListBoxConstants) -- style values for the list-box **Style** property
+- [**LoadPictureColorConstants**](../tB/Packages/VBRUN/Constants/LoadPictureColorConstants) -- colour depth for **LoadPicture**
+- [**LoadPictureSizeConstants**](../tB/Packages/VBRUN/Constants/LoadPictureSizeConstants) -- size selector for **LoadPicture**
+- [**LoadResConstants**](../tB/Packages/VBRUN/Constants/LoadResConstants) -- resource-type values for **LoadResPicture**
+- [**LogEventTypeConstants**](../tB/Packages/VBRUN/Constants/LogEventTypeConstants) -- severity values for **LogEvent**
+- [**LogModeConstants**](../tB/Packages/VBRUN/Constants/LogModeConstants) -- destination and behaviour flags for **App.StartLogging**
+- [**MenuAccelConstants**](../tB/Packages/VBRUN/Constants/MenuAccelConstants) -- keyboard-accelerator codes for menu-item shortcuts
+- [**MenuControlConstants**](../tB/Packages/VBRUN/Constants/MenuControlConstants) -- alignment and trigger-button flags for **PopupMenu**
+- [**MouseButtonConstants**](../tB/Packages/VBRUN/Constants/MouseButtonConstants) -- bit flags for the *Button* argument of mouse events
+- [**MousePointerConstants**](../tB/Packages/VBRUN/Constants/MousePointerConstants) -- cursor-shape values for the **MousePointer** property
+- [**MultiSelectConstants**](../tB/Packages/VBRUN/Constants/MultiSelectConstants) -- multi-selection mode for the list-box **MultiSelect** property
+- [**NegotiatePositionConstants**](../tB/Packages/VBRUN/Constants/NegotiatePositionConstants) -- menu placement during OLE in-place activation
+- [**OldLinkModeConstants**](../tB/Packages/VBRUN/Constants/OldLinkModeConstants) -- legacy DDE link-mode values retained for compatibility
+- [**OLEContainerActivateConstants**](../tB/Packages/VBRUN/Constants/OLEContainerActivateConstants) -- activation trigger for the **AutoActivate** property
+- [**OLEContainerConstants**](../tB/Packages/VBRUN/Constants/OLEContainerConstants) -- combined enumeration of all OLE container option values
+- [**OLEContainerDisplayTypeConstants**](../tB/Packages/VBRUN/Constants/OLEContainerDisplayTypeConstants) -- display style for the OLE container **DisplayType** property
+- [**OLEContainerSizeModeConstants**](../tB/Packages/VBRUN/Constants/OLEContainerSizeModeConstants) -- sizing rules for the OLE container **SizeMode** property
+- [**OLEContainerTypesAllowedConstants**](../tB/Packages/VBRUN/Constants/OLEContainerTypesAllowedConstants) -- object-type filter for **OLETypeAllowed**
+- [**OLEContainerUpdateOptionsConstants**](../tB/Packages/VBRUN/Constants/OLEContainerUpdateOptionsConstants) -- update mode for a linked OLE object
+- [**OLEDragConstants**](../tB/Packages/VBRUN/Constants/OLEDragConstants) -- OLE drag-mode values for **OLEDragMode**
+- [**OLEDropConstants**](../tB/Packages/VBRUN/Constants/OLEDropConstants) -- OLE drop-mode values for **OLEDropMode**
+- [**OLEDropEffectConstants**](../tB/Packages/VBRUN/Constants/OLEDropEffectConstants) -- bit flags for the *Effect* argument of OLE drag-and-drop events
+- [**PaletteModeConstants**](../tB/Packages/VBRUN/Constants/PaletteModeConstants) -- palette-source values for forms and UserControls
+- [**ParentControlsType**](../tB/Packages/VBRUN/Constants/ParentControlsType) -- wrapping mode for the **ParentControls** collection
+- [**PictureTypeConstants**](../tB/Packages/VBRUN/Constants/PictureTypeConstants) -- subtype values for **stdole.IPictureDisp**
+- [**PrinterObjectConstants**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants) -- combined enumeration of all **Printer** object option values
+- [**PrinterObjectConstants_ColorMode**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_ColorMode) -- colour mode for **Printer.ColorMode**
+- [**PrinterObjectConstants_Duplex**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_Duplex) -- duplex mode for **Printer.Duplex**
+- [**PrinterObjectConstants_Orientation**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_Orientation) -- paper orientation for **Printer.Orientation**
+- [**PrinterObjectConstants_PaperBin**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_PaperBin) -- paper source for **Printer.PaperBin**
+- [**PrinterObjectConstants_PaperSize**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_PaperSize) -- paper size for **Printer.PaperSize**
+- [**PrinterObjectConstants_PrintQuality**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_PrintQuality) -- print quality for **Printer.PrintQuality**
+- [**QueryUnloadConstants**](../tB/Packages/VBRUN/Constants/QueryUnloadConstants) -- reason codes for the form's **QueryUnload** event
+- [**RasterOpConstants**](../tB/Packages/VBRUN/Constants/RasterOpConstants) -- GDI raster-operation codes for **PaintPicture**
+- [**RecordsetTypeConstants**](../tB/Packages/VBRUN/Constants/RecordsetTypeConstants) -- recordset type for a Data control
+- [**ScaleModeConstants**](../tB/Packages/VBRUN/Constants/ScaleModeConstants) -- measurement units for the **ScaleMode** property
+- [**ScrollBarConstants**](../tB/Packages/VBRUN/Constants/ScrollBarConstants) -- which scrollbars appear on text-box and similar controls
+- [**ShapeConstants**](../tB/Packages/VBRUN/Constants/ShapeConstants) -- geometric shape values for the Shape control's **Shape** property
+- [**ShiftConstants**](../tB/Packages/VBRUN/Constants/ShiftConstants) -- modifier-key bit flags for mouse and key events
+- [**ShortcutConstants**](../tB/Packages/VBRUN/Constants/ShortcutConstants) -- shortcut-key identifiers for menu items
+- [**StartUpPositionConstants**](../tB/Packages/VBRUN/Constants/StartUpPositionConstants) -- initial position for a form's **StartUpPosition** property
+- [**StorageTypeContants**](../tB/Packages/VBRUN/Constants/StorageTypeContants) -- OLE data-storage medium identifiers for **DataObjectFormat**
+- [**SystemColorConstants**](../tB/Packages/VBRUN/Constants/SystemColorConstants) -- system-UI colour references (pass through **TranslateColor** for plain RGB)
+- [**VariantTypeConstants**](../tB/Packages/VBRUN/Constants/VariantTypeConstants) -- legacy DAO field-type tags retained for compatibility
+- [**VerticalAlignmentConstants**](../tB/Packages/VBRUN/Constants/VerticalAlignmentConstants) -- vertical text alignment for cell-style controls
+- [**ZOrderConstants**](../tB/Packages/VBRUN/Constants/ZOrderConstants) -- position selectors for the **ZOrder** method
+
+### WebView2 Package
+
+Ten enumerations for navigation errors, permissions, download placement, script dialogs, print orientation, and resource-request filtering.
+
+- [**wv2DefaultDownloadCornerAlign**](../tB/Packages/WebView2/Enumerations/wv2DefaultDownloadCornerAlign) -- anchors the built-in download-progress dialog to a corner of the control
+- [**wv2ErrorStatus**](../tB/Packages/WebView2/Enumerations/wv2ErrorStatus) -- reason a navigation failed (passed in the **NavigationComplete** event)
+- [**wv2HostResourceAccessKind**](../tB/Packages/WebView2/Enumerations/wv2HostResourceAccessKind) -- cross-origin access policy for a virtual hostname mapping
+- [**wv2KeyEventKind**](../tB/Packages/WebView2/Enumerations/wv2KeyEventKind) -- keyboard message kind in the **AcceleratorKeyPressed** event
+- [**wv2PermissionKind**](../tB/Packages/WebView2/Enumerations/wv2PermissionKind) -- which device or browser capability a page is requesting
+- [**wv2PermissionState**](../tB/Packages/WebView2/Enumerations/wv2PermissionState) -- the host's decision on a permission request
+- [**wv2PrintOrientation**](../tB/Packages/WebView2/Enumerations/wv2PrintOrientation) -- page orientation for **PrintToPdf**
+- [**wv2ProcessFailedKind**](../tB/Packages/WebView2/Enumerations/wv2ProcessFailedKind) -- identifies which WebView2 process failed
+- [**wv2ScriptDialogKind**](../tB/Packages/WebView2/Enumerations/wv2ScriptDialogKind) -- which JavaScript dialog primitive the page is trying to open
+- [**wv2WebResourceContext**](../tB/Packages/WebView2/Enumerations/wv2WebResourceContext) -- request kind matched by a web-resource filter
+
+### CustomControls Package
+
+Thirteen enumerations governing the appearance and behaviour of the `Waynes...` custom controls.
+
+- [**BorderStyle**](../tB/Packages/CustomControls/Enumerations/BorderStyle) -- Win32 frame style for a **WaynesForm** window
+- [**ColorRGBA**](../tB/Packages/CustomControls/Enumerations/ColorRGBA) -- 32-bit ABGR colour value type alias
+- [**CornerShape**](../tB/Packages/CustomControls/Enumerations/CornerShape) -- shape of a single corner of a control (square, rounded, cut)
+- [**Customtate**](../tB/Packages/CustomControls/Enumerations/Customtate) -- control state flags for custom-state painting
+- [**DockMode**](../tB/Packages/CustomControls/Enumerations/DockMode) -- how a control is positioned relative to its container
+- [**FillPattern**](../tB/Packages/CustomControls/Enumerations/FillPattern) -- how colour stops in a **Fill** are applied across the painted area
+- [**FontWeight**](../tB/Packages/CustomControls/Enumerations/FontWeight) -- font weight on the standard 100--900 OpenType scale
+- [**PixelCount**](../tB/Packages/CustomControls/Enumerations/PixelCount) -- pixel-measurement type alias used throughout the package
+- [**PointSize**](../tB/Packages/CustomControls/Enumerations/PointSize) -- typographic-point font-size type alias
+- [**StartupPosition**](../tB/Packages/CustomControls/Enumerations/StartupPosition) -- initial position of a **WaynesForm** window when first shown
+- [**TextAlignment**](../tB/Packages/CustomControls/Enumerations/TextAlignment) -- horizontal and vertical text alignment within a control
+- [**TextOverflowMode**](../tB/Packages/CustomControls/Enumerations/TextOverflowMode) -- how text that does not fit is truncated
+- [**WindowState**](../tB/Packages/CustomControls/Enumerations/WindowState) -- minimized, restored, or maximized state of a **WaynesForm**
+
+### CEF Package
+
+Two enumerations for log verbosity and print orientation.
+
+- [**CefLogSeverity**](../tB/Packages/CEF/Enumerations/CefLogSeverity) -- minimum severity at which the CEF runtime records messages to its debug log
+- [**cefPrintOrientation**](../tB/Packages/CEF/Enumerations/cefPrintOrientation) -- page orientation for **PrintToPdf**
+
+### WinServicesLib Package
+
+Four enumerations covering service type, start mode, control codes, and runtime status.
+
+- [**ServiceControlCodeConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceControlCodeConstants) -- control codes the SCM can deliver to a running service
+- [**ServiceStartConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceStartConstants) -- when and how the SCM starts a service
+- [**ServiceStatusConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceStatusConstants) -- runtime-state values a service reports to the SCM
+- [**ServiceTypeConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceTypeConstants) -- Win32 service-type values (own process, shared host, kernel driver)
+
+### WinNativeCommonCtls Package
+
+Ten enumerations for the eight native common controls.
+
+- [**DTPickerFormatConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/DTPickerFormatConstants) -- display format for a **DTPicker** control
+- [**ImlDrawConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/ImlDrawConstants) -- render-style flags for **ListImage.Draw**
+- [**OrientationConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/OrientationConstants) -- horizontal / vertical orientation for **Slider** and **UpDown**
+- [**TreeBorderStyleConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeBorderStyleConstants) -- border style shared by **TreeView** and **ListView**
+- [**TreeLabelEditConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeLabelEditConstants) -- when inline label editing is triggered on a **TreeView**
+- [**TreeLineStyleConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeLineStyleConstants) -- whether the **TreeView** draws lines from root nodes or only child nodes
+- [**TreeRelationshipConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeRelationshipConstants) -- where a new node is inserted relative to an existing node
+- [**TreeSortOrderConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeSortOrderConstants) -- ascending or descending sort order for **TreeView** and **Node**
+- [**TreeSortTypeConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeSortTypeConstants) -- case-sensitive or case-insensitive sort comparison
+- [**TreeStyleConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeStyleConstants) -- composite visual style of a **TreeView** (buttons, lines, icons)
+
+---
+
+## Alphabetical index
+
+**A**
+
+- [**AlignConstants**](../tB/Packages/VBRUN/Constants/AlignConstants) -- **Align** property values (VBRUN)
+- [**AlignmentConstants**](../tB/Packages/VBRUN/Constants/AlignmentConstants) -- text alignment for labels and text boxes (VBRUN)
+- [**AlignmentConstantsNoCenter**](../tB/Packages/VBRUN/Constants/AlignmentConstantsNoCenter) -- left/right text alignment without centre (VBRUN)
+- [**AppearanceConstants**](../tB/Packages/VBRUN/Constants/AppearanceConstants) -- drawing style for **Appearance** property (VBRUN)
+- [**ApplicationStartConstants**](../tB/Packages/VBRUN/Constants/ApplicationStartConstants) -- standalone vs. Automation start mode (VBRUN)
+- [**AspectTypeConstants**](../tB/Packages/VBRUN/Constants/AspectTypeConstants) -- OLE rendering aspect identifiers (VBRUN)
+- [**AsyncReadConstants**](../tB/Packages/VBRUN/Constants/AsyncReadConstants) -- **UserControl.AsyncRead** option flags (VBRUN)
+- [**AsyncStatusCodeConstants**](../tB/Packages/VBRUN/Constants/AsyncStatusCodeConstants) -- **AsyncReadProgress** status codes (VBRUN)
+- [**AsyncTypeConstants**](../tB/Packages/VBRUN/Constants/AsyncTypeConstants) -- data kind from **UserControl.AsyncRead** (VBRUN)
+
+**B**
+
+- [**BackFillStyleConstants**](../tB/Packages/VBRUN/Constants/BackFillStyleConstants) -- opaque vs. transparent background (VBRUN)
+- [**BorderStyle**](../tB/Packages/CustomControls/Enumerations/BorderStyle) -- Win32 frame style for **WaynesForm** (CustomControls)
+- [**BorderStyleConstants**](../tB/Packages/VBRUN/Constants/BorderStyleConstants) -- line style for Shape and Line controls (VBRUN)
+- [**ButtonConstants**](../tB/Packages/VBRUN/Constants/ButtonConstants) -- style for graphical command buttons (VBRUN)
+
+**C**
+
+- [**CefLogSeverity**](../tB/Packages/CEF/Enumerations/CefLogSeverity) -- CEF debug-log minimum severity (CEF)
+- [**cefPrintOrientation**](../tB/Packages/CEF/Enumerations/cefPrintOrientation) -- page orientation for **PrintToPdf** (CEF)
+- [**CheckBoxConstants**](../tB/Packages/VBRUN/Constants/CheckBoxConstants) -- check-box **Value** property state (VBRUN)
+- [**ClipboardConstants**](../tB/Packages/VBRUN/Constants/ClipboardConstants) -- clipboard format identifiers (VBRUN)
+- [**ColorConstants**](../tB/Packages/VBRUN/Constants/ColorConstants) -- named RGB colours (VBRUN)
+- [**ColorRGBA**](../tB/Packages/CustomControls/Enumerations/ColorRGBA) -- 32-bit ABGR colour type alias (CustomControls)
+- [**ComboBoxConstants**](../tB/Packages/VBRUN/Constants/ComboBoxConstants) -- combo-box **Style** property values (VBRUN)
+- [**ControlBorderStyleConstants**](../tB/Packages/VBRUN/Constants/ControlBorderStyleConstants) -- border style for intrinsic controls (VBRUN)
+- [**ControlBorderStyleConstantsCustom**](../tB/Packages/VBRUN/Constants/ControlBorderStyleConstantsCustom) -- extended border style including custom-drawn (VBRUN)
+- [**ControlTypeConstants**](../tB/Packages/VBRUN/Constants/ControlTypeConstants) -- standard intrinsic control type identifiers (VBRUN)
+- [**CornerShape**](../tB/Packages/CustomControls/Enumerations/CornerShape) -- corner shape (square, rounded, cut) (CustomControls)
+- [**Customtate**](../tB/Packages/CustomControls/Enumerations/Customtate) -- control state flags for custom painting (CustomControls)
+
+**D**
+
+- [**DatabaseTypeConstants**](../tB/Packages/VBRUN/Constants/DatabaseTypeConstants) -- Data control database engine (VBRUN)
+- [**DataBOFconstants**](../tB/Packages/VBRUN/Constants/DataBOFconstants) -- action at beginning of recordset (VBRUN)
+- [**DataEOFConstants**](../tB/Packages/VBRUN/Constants/DataEOFConstants) -- action at end of recordset (VBRUN)
+- [**DataErrorConstants**](../tB/Packages/VBRUN/Constants/DataErrorConstants) -- Data control **Error** event response values (VBRUN)
+- [**DataValidateConstants**](../tB/Packages/VBRUN/Constants/DataValidateConstants) -- action codes in the **Validate** event (VBRUN)
+- [**DefaultCursorTypeConstants**](../tB/Packages/VBRUN/Constants/DefaultCursorTypeConstants) -- cursor driver for a Data control connection (VBRUN)
+- [**DockMode**](../tB/Packages/CustomControls/Enumerations/DockMode) -- how a CustomControl is docked (CustomControls)
+- [**DockModeConstants**](../tB/Packages/VBRUN/Constants/DockModeConstants) -- dock-edge values for forms and toolbars (VBRUN)
+- [**DragConstants**](../tB/Packages/VBRUN/Constants/DragConstants) -- **Drag** method action values (VBRUN)
+- [**DragModeConstants**](../tB/Packages/VBRUN/Constants/DragModeConstants) -- automatic vs. manual drag mode (VBRUN)
+- [**DragOverConstants**](../tB/Packages/VBRUN/Constants/DragOverConstants) -- state values in the **DragOver** event (VBRUN)
+- [**DrawModeConstants**](../tB/Packages/VBRUN/Constants/DrawModeConstants) -- GDI raster-operation for **DrawMode** (VBRUN)
+- [**DrawStyleConstants**](../tB/Packages/VBRUN/Constants/DrawStyleConstants) -- line style for **DrawStyle** property (VBRUN)
+- [**DTPickerFormatConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/DTPickerFormatConstants) -- **DTPicker** display format (WinNativeCommonCtls)
+
+**F**
+
+- [**FillPattern**](../tB/Packages/CustomControls/Enumerations/FillPattern) -- how colour stops in a **Fill** are applied (CustomControls)
+- [**FillStyleConstants**](../tB/Packages/VBRUN/Constants/FillStyleConstants) -- fill pattern for **FillStyle** property (VBRUN)
+- [**FillStyleConstantsEx**](../tB/Packages/VBRUN/Constants/FillStyleConstantsEx) -- extended fill patterns with gradient fills (VBRUN)
+- [**FontWeight**](../tB/Packages/CustomControls/Enumerations/FontWeight) -- font weight on the 100--900 scale (CustomControls)
+- [**FormArrangeConstants**](../tB/Packages/VBRUN/Constants/FormArrangeConstants) -- MDI child-window arrangement modes (VBRUN)
+- [**FormBorderStyleConstants**](../tB/Packages/VBRUN/Constants/FormBorderStyleConstants) -- form border and frame style (VBRUN)
+- [**FormShowConstants**](../tB/Packages/VBRUN/Constants/FormShowConstants) -- modality for **Show** (VBRUN)
+- [**FormWindowStateConstants**](../tB/Packages/VBRUN/Constants/FormWindowStateConstants) -- form window state (VBRUN)
+
+**H**
+
+- [**HitResultConstants**](../tB/Packages/VBRUN/Constants/HitResultConstants) -- **UserControl.HitTest** return values (VBRUN)
+
+**I**
+
+- [**ImlDrawConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/ImlDrawConstants) -- **ListImage.Draw** render-style flags (WinNativeCommonCtls)
+
+**K**
+
+- [**KeyCodeConstants**](../tB/Packages/VBRUN/Constants/KeyCodeConstants) -- virtual-key codes for key events (VBRUN)
+
+**L**
+
+- [**LinkModeConstants**](../tB/Packages/VBRUN/Constants/LinkModeConstants) -- DDE link-mode values (VBRUN)
+- [**ListBoxConstants**](../tB/Packages/VBRUN/Constants/ListBoxConstants) -- list-box **Style** property values (VBRUN)
+- [**LoadPictureColorConstants**](../tB/Packages/VBRUN/Constants/LoadPictureColorConstants) -- **LoadPicture** colour depth (VBRUN)
+- [**LoadPictureSizeConstants**](../tB/Packages/VBRUN/Constants/LoadPictureSizeConstants) -- **LoadPicture** size selector (VBRUN)
+- [**LoadResConstants**](../tB/Packages/VBRUN/Constants/LoadResConstants) -- **LoadResPicture** resource type (VBRUN)
+- [**LogEventTypeConstants**](../tB/Packages/VBRUN/Constants/LogEventTypeConstants) -- **LogEvent** severity values (VBRUN)
+- [**LogModeConstants**](../tB/Packages/VBRUN/Constants/LogModeConstants) -- **App.StartLogging** destination flags (VBRUN)
+
+**M**
+
+- [**MenuAccelConstants**](../tB/Packages/VBRUN/Constants/MenuAccelConstants) -- menu-item keyboard-accelerator codes (VBRUN)
+- [**MenuControlConstants**](../tB/Packages/VBRUN/Constants/MenuControlConstants) -- **PopupMenu** alignment and trigger flags (VBRUN)
+- [**MouseButtonConstants**](../tB/Packages/VBRUN/Constants/MouseButtonConstants) -- mouse-event *Button* argument bit flags (VBRUN)
+- [**MousePointerConstants**](../tB/Packages/VBRUN/Constants/MousePointerConstants) -- **MousePointer** property cursor shape (VBRUN)
+- [**MultiSelectConstants**](../tB/Packages/VBRUN/Constants/MultiSelectConstants) -- list-box multi-selection mode (VBRUN)
+
+**N**
+
+- [**NegotiatePositionConstants**](../tB/Packages/VBRUN/Constants/NegotiatePositionConstants) -- menu placement during OLE in-place activation (VBRUN)
+
+**O**
+
+- [**OldLinkModeConstants**](../tB/Packages/VBRUN/Constants/OldLinkModeConstants) -- legacy DDE link-mode values (VBRUN)
+- [**OLEContainerActivateConstants**](../tB/Packages/VBRUN/Constants/OLEContainerActivateConstants) -- OLE container auto-activation trigger (VBRUN)
+- [**OLEContainerConstants**](../tB/Packages/VBRUN/Constants/OLEContainerConstants) -- combined OLE container option values (VBRUN)
+- [**OLEContainerDisplayTypeConstants**](../tB/Packages/VBRUN/Constants/OLEContainerDisplayTypeConstants) -- OLE container display style (VBRUN)
+- [**OLEContainerSizeModeConstants**](../tB/Packages/VBRUN/Constants/OLEContainerSizeModeConstants) -- OLE container sizing rules (VBRUN)
+- [**OLEContainerTypesAllowedConstants**](../tB/Packages/VBRUN/Constants/OLEContainerTypesAllowedConstants) -- OLE container object-type filter (VBRUN)
+- [**OLEContainerUpdateOptionsConstants**](../tB/Packages/VBRUN/Constants/OLEContainerUpdateOptionsConstants) -- OLE container update mode (VBRUN)
+- [**OLEDragConstants**](../tB/Packages/VBRUN/Constants/OLEDragConstants) -- **OLEDragMode** property values (VBRUN)
+- [**OLEDropConstants**](../tB/Packages/VBRUN/Constants/OLEDropConstants) -- **OLEDropMode** property values (VBRUN)
+- [**OLEDropEffectConstants**](../tB/Packages/VBRUN/Constants/OLEDropEffectConstants) -- OLE drag-and-drop *Effect* bit flags (VBRUN)
+- [**OrientationConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/OrientationConstants) -- horizontal / vertical for **Slider** and **UpDown** (WinNativeCommonCtls)
+
+**P**
+
+- [**PaletteModeConstants**](../tB/Packages/VBRUN/Constants/PaletteModeConstants) -- palette source for forms and UserControls (VBRUN)
+- [**ParentControlsType**](../tB/Packages/VBRUN/Constants/ParentControlsType) -- **ParentControls** collection wrapping mode (VBRUN)
+- [**PictureTypeConstants**](../tB/Packages/VBRUN/Constants/PictureTypeConstants) -- **IPictureDisp** subtype values (VBRUN)
+- [**PixelCount**](../tB/Packages/CustomControls/Enumerations/PixelCount) -- pixel-measurement type alias (CustomControls)
+- [**PointSize**](../tB/Packages/CustomControls/Enumerations/PointSize) -- typographic-point font-size type alias (CustomControls)
+- [**PrinterObjectConstants**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants) -- combined **Printer** object option values (VBRUN)
+- [**PrinterObjectConstants_ColorMode**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_ColorMode) -- **Printer.ColorMode** values (VBRUN)
+- [**PrinterObjectConstants_Duplex**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_Duplex) -- **Printer.Duplex** values (VBRUN)
+- [**PrinterObjectConstants_Orientation**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_Orientation) -- **Printer.Orientation** values (VBRUN)
+- [**PrinterObjectConstants_PaperBin**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_PaperBin) -- **Printer.PaperBin** values (VBRUN)
+- [**PrinterObjectConstants_PaperSize**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_PaperSize) -- **Printer.PaperSize** values (VBRUN)
+- [**PrinterObjectConstants_PrintQuality**](../tB/Packages/VBRUN/Constants/PrinterObjectConstants_PrintQuality) -- **Printer.PrintQuality** values (VBRUN)
+
+**Q**
+
+- [**QueryUnloadConstants**](../tB/Packages/VBRUN/Constants/QueryUnloadConstants) -- **QueryUnload** event reason codes (VBRUN)
+
+**R**
+
+- [**RasterOpConstants**](../tB/Packages/VBRUN/Constants/RasterOpConstants) -- GDI raster-operation codes for **PaintPicture** (VBRUN)
+- [**RecordsetTypeConstants**](../tB/Packages/VBRUN/Constants/RecordsetTypeConstants) -- Data control recordset type (VBRUN)
+
+**S**
+
+- [**ScaleModeConstants**](../tB/Packages/VBRUN/Constants/ScaleModeConstants) -- measurement units for **ScaleMode** (VBRUN)
+- [**ScrollBarConstants**](../tB/Packages/VBRUN/Constants/ScrollBarConstants) -- which scrollbars appear on a control (VBRUN)
+- [**ServiceControlCodeConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceControlCodeConstants) -- SCM control codes for a running service (WinServicesLib)
+- [**ServiceStartConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceStartConstants) -- service start mode (WinServicesLib)
+- [**ServiceStatusConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceStatusConstants) -- service runtime state values (WinServicesLib)
+- [**ServiceTypeConstants**](../tB/Packages/WinServicesLib/Enumerations/ServiceTypeConstants) -- Win32 service type (WinServicesLib)
+- [**ShapeConstants**](../tB/Packages/VBRUN/Constants/ShapeConstants) -- geometric shape for the Shape control (VBRUN)
+- [**ShiftConstants**](../tB/Packages/VBRUN/Constants/ShiftConstants) -- modifier-key bit flags for mouse and key events (VBRUN)
+- [**ShortcutConstants**](../tB/Packages/VBRUN/Constants/ShortcutConstants) -- menu-item keyboard shortcut identifiers (VBRUN)
+- [**StartupPosition**](../tB/Packages/CustomControls/Enumerations/StartupPosition) -- initial position of a **WaynesForm** (CustomControls)
+- [**StartUpPositionConstants**](../tB/Packages/VBRUN/Constants/StartUpPositionConstants) -- form **StartUpPosition** property values (VBRUN)
+- [**StorageTypeContants**](../tB/Packages/VBRUN/Constants/StorageTypeContants) -- OLE data-storage medium identifiers (VBRUN)
+- [**SystemColorConstants**](../tB/Packages/VBRUN/Constants/SystemColorConstants) -- system-UI colour references (VBRUN)
+
+**T**
+
+- [**TextAlignment**](../tB/Packages/CustomControls/Enumerations/TextAlignment) -- horizontal and vertical text alignment (CustomControls)
+- [**TextOverflowMode**](../tB/Packages/CustomControls/Enumerations/TextOverflowMode) -- text truncation mode (CustomControls)
+- [**TreeBorderStyleConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeBorderStyleConstants) -- **TreeView** and **ListView** border style (WinNativeCommonCtls)
+- [**TreeLabelEditConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeLabelEditConstants) -- **TreeView** inline-label-editing trigger (WinNativeCommonCtls)
+- [**TreeLineStyleConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeLineStyleConstants) -- **TreeView** tree-lines scope (WinNativeCommonCtls)
+- [**TreeRelationshipConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeRelationshipConstants) -- **Nodes.Add** insertion position (WinNativeCommonCtls)
+- [**TreeSortOrderConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeSortOrderConstants) -- **TreeView** / **Node** sort direction (WinNativeCommonCtls)
+- [**TreeSortTypeConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeSortTypeConstants) -- **TreeView** / **Node** sort comparison mode (WinNativeCommonCtls)
+- [**TreeStyleConstants**](../tB/Packages/WinNativeCommonCtls/Enumerations/TreeStyleConstants) -- **TreeView** composite visual style (WinNativeCommonCtls)
+
+**V**
+
+- [**VbAppWinStyle**](../tB/Modules/Constants/VbAppWinStyle) -- window-style values for **Shell** (VBA)
+- [**VbArchitecture**](../tB/Modules/Constants/VbArchitecture) -- processor-architecture values (VBA)
+- [**VbCalendar**](../tB/Modules/Constants/VbCalendar) -- calendar type values (VBA)
+- [**VbCallType**](../tB/Modules/Constants/VbCallType) -- **CallByName** call-type flags (VBA)
+- [**VbCompareMethod**](../tB/Modules/Constants/VbCompareMethod) -- text-comparison mode for string functions (VBA)
+- [**VbDateTimeFormat**](../tB/Modules/Constants/VbDateTimeFormat) -- **FormatDateTime** format codes (VBA)
+- [**VbDayOfWeek**](../tB/Modules/Constants/VbDayOfWeek) -- day-of-week constants for date functions (VBA)
+- [**VbFileAttribute**](../tB/Modules/Constants/VbFileAttribute) -- file-attribute flags (VBA)
+- [**VbFirstWeekOfYear**](../tB/Modules/Constants/VbFirstWeekOfYear) -- first-week-of-year selectors for date functions (VBA)
+- [**VbIMEStatus**](../tB/Modules/Constants/VbIMEStatus) -- Input Method Editor mode constants (VBA)
+- [**VbMsgBoxResult**](../tB/Modules/Constants/VbMsgBoxResult) -- **MsgBox** button-clicked identifier (VBA)
+- [**VbMsgBoxStyle**](../tB/Modules/Constants/VbMsgBoxStyle) -- **MsgBox** button, icon, and modality flags (VBA)
+- [**VbStrConv**](../tB/Modules/Constants/VbStrConv) -- **StrConv** conversion-type flags (VBA)
+- [**VbTriState**](../tB/Modules/Constants/VbTriState) -- three-state values for formatting functions (VBA)
+- [**VbVarType**](../tB/Modules/Constants/VbVarType) -- **VarType** Variant subtype codes (VBA)
+- [**VariantTypeConstants**](../tB/Packages/VBRUN/Constants/VariantTypeConstants) -- legacy DAO field-type tags (VBRUN)
+- [**VerticalAlignmentConstants**](../tB/Packages/VBRUN/Constants/VerticalAlignmentConstants) -- vertical text alignment (VBRUN)
+
+**W**
+
+- [**WindowState**](../tB/Packages/CustomControls/Enumerations/WindowState) -- **WaynesForm** window state (CustomControls)
+- [**wv2DefaultDownloadCornerAlign**](../tB/Packages/WebView2/Enumerations/wv2DefaultDownloadCornerAlign) -- download-dialog corner alignment (WebView2)
+- [**wv2ErrorStatus**](../tB/Packages/WebView2/Enumerations/wv2ErrorStatus) -- navigation failure reason (WebView2)
+- [**wv2HostResourceAccessKind**](../tB/Packages/WebView2/Enumerations/wv2HostResourceAccessKind) -- virtual-hostname cross-origin access policy (WebView2)
+- [**wv2KeyEventKind**](../tB/Packages/WebView2/Enumerations/wv2KeyEventKind) -- accelerator-key event kind (WebView2)
+- [**wv2PermissionKind**](../tB/Packages/WebView2/Enumerations/wv2PermissionKind) -- permission request capability identifier (WebView2)
+- [**wv2PermissionState**](../tB/Packages/WebView2/Enumerations/wv2PermissionState) -- permission-request decision (WebView2)
+- [**wv2PrintOrientation**](../tB/Packages/WebView2/Enumerations/wv2PrintOrientation) -- **PrintToPdf** page orientation (WebView2)
+- [**wv2ProcessFailedKind**](../tB/Packages/WebView2/Enumerations/wv2ProcessFailedKind) -- failed WebView2 process identifier (WebView2)
+- [**wv2ScriptDialogKind**](../tB/Packages/WebView2/Enumerations/wv2ScriptDialogKind) -- JavaScript dialog kind (WebView2)
+- [**wv2WebResourceContext**](../tB/Packages/WebView2/Enumerations/wv2WebResourceContext) -- web-resource filter request kind (WebView2)
+
+**Z**
+
+- [**ZOrderConstants**](../tB/Packages/VBRUN/Constants/ZOrderConstants) -- **ZOrder** method position selectors (VBRUN)
+
+---
+
+### See Also
+
+- [Statements](Statements) -- alphabetical index of language statements
+- [Procedures and Functions](Procedures-and-Functions) -- alphabetical index of callable runtime members
+- [Operators](Operators) -- arithmetic, comparison, logical, and bitwise operators
+- [Packages](../tB/Packages/) -- all twelve built-in packages
diff --git a/docs/Reference/Procedures and Functions.md b/docs/Reference/Procedures and Functions.md
index d0175a14..5d838cac 100644
--- a/docs/Reference/Procedures and Functions.md
+++ b/docs/Reference/Procedures and Functions.md
@@ -7,9 +7,6 @@ permalink: /Reference/Procedures-and-Functions
# Procedures and Functions
-> [!WARNING]
-> Work in Progress
-
## A
- [Abs](../tB/Modules/Math/Abs) -- returns the absolute value of a number
diff --git a/docs/Reference/VB/CheckBox/index.md b/docs/Reference/VB/CheckBox/index.md
index e4f559e4..0aa97bf7 100644
--- a/docs/Reference/VB/CheckBox/index.md
+++ b/docs/Reference/VB/CheckBox/index.md
@@ -3,7 +3,6 @@ title: CheckBox
parent: VB Package
permalink: /tB/Packages/VB/CheckBox/
has_toc: false
-vba_attribution: true
---
# CheckBox class
diff --git a/docs/Reference/VBA/Conversion/Nz.md b/docs/Reference/VBA/Conversion/Nz.md
index df241a79..534d3080 100644
--- a/docs/Reference/VBA/Conversion/Nz.md
+++ b/docs/Reference/VBA/Conversion/Nz.md
@@ -37,3 +37,8 @@ Dim customerName As Variant
customerName = recordset.Fields("Name").Value
MsgBox "Customer Name: " & Nz(customerName, "Unknown")
```
+
+### See Also
+
+- [IsNull](../Information/IsNull) function
+- [IIf](../Interaction/IIf) function
diff --git a/docs/Reference/VBA/FileSystem/ChDir.md b/docs/Reference/VBA/FileSystem/ChDir.md
index cca3dfed..fcaf3a8f 100644
--- a/docs/Reference/VBA/FileSystem/ChDir.md
+++ b/docs/Reference/VBA/FileSystem/ChDir.md
@@ -13,8 +13,8 @@ Changes the current directory or folder.
Syntax: **ChDir** *path*
-path
-: A string expression that identifies which directory or folder becomes the new default directory or folder. The *path* may include the drive. If no drive is specified, **ChDir** changes the default directory or folder on the current drive.
+*path*
+: *required* A string expression that identifies which directory or folder becomes the new default directory or folder. The *path* may include the drive. If no drive is specified, **ChDir** changes the default directory or folder on the current drive.
The **ChDir** statement changes the default directory but not the default drive. For example, if the default drive is C, the following statement changes the default directory on drive D, but C remains the default drive:
diff --git a/docs/Reference/VBA/FileSystem/ChDrive.md b/docs/Reference/VBA/FileSystem/ChDrive.md
index e4ed21d6..3de7f235 100644
--- a/docs/Reference/VBA/FileSystem/ChDrive.md
+++ b/docs/Reference/VBA/FileSystem/ChDrive.md
@@ -13,9 +13,8 @@ Changes the current drive.
Syntax: **ChDrive** *drive*
-drive
-
-: A string expression that specifies an existing drive. If *drive* is a zero-length string (""), the current drive doesn't change. If the *drive* argument is a multiple-character string, **ChDrive** uses only the first letter.
+*drive*
+: *required* A string expression that specifies an existing drive. If *drive* is a zero-length string (""), the current drive doesn't change. If the *drive* argument is a multiple-character string, **ChDrive** uses only the first letter.
### See Also
diff --git a/docs/Reference/VBA/FileSystem/FileCopy.md b/docs/Reference/VBA/FileSystem/FileCopy.md
index 63bc4663..5601b40f 100644
--- a/docs/Reference/VBA/FileSystem/FileCopy.md
+++ b/docs/Reference/VBA/FileSystem/FileCopy.md
@@ -14,10 +14,10 @@ Copies a file.
Syntax: **FileCopy** *source*, *destination*
*source*
-: String expression that specifies the name of the file to be copied. The *source* may include directory or folder, and drive.
+: *required* String expression that specifies the name of the file to be copied. The *source* may include directory or folder, and drive.
*destination*
-: String expression that specifies the target file name. The *destination* may include directory or folder, and drive.
+: *required* String expression that specifies the target file name. The *destination* may include directory or folder, and drive.
An error occurs when **FileCopy** is used on a file that is currently open.
@@ -30,4 +30,10 @@ Dim SourceFile, DestinationFile
SourceFile = "SRCFILE" ' Define source file name.
DestinationFile = "DESTFILE" ' Define target file name.
FileCopy SourceFile, DestinationFile ' Copy source to target.
-```
\ No newline at end of file
+```
+
+### See Also
+
+- [Kill](Kill) statement
+- [Name](../../Core/Name) statement
+- [FileLen](FileLen) function
\ No newline at end of file
diff --git a/docs/Reference/VBA/HiddenModule/FreeMem.md b/docs/Reference/VBA/HiddenModule/FreeMem.md
index ab589391..5974c2ee 100644
--- a/docs/Reference/VBA/HiddenModule/FreeMem.md
+++ b/docs/Reference/VBA/HiddenModule/FreeMem.md
@@ -15,6 +15,16 @@ Syntax: **FreeMem** *MemPointer*
The pointer is invalid after the call returns. Passing a pointer that did not come from **AllocMem** --- including zero, or one that has already been freed --- has undefined behaviour.
+### Example
+
+This example allocates a buffer, uses it, and then releases it with **FreeMem**.
+
+```tb
+Dim buf As LongPtr = AllocMem(256)
+' ... write and read buf ...
+FreeMem buf ' release the block; buf is invalid after this point
+```
+
### See Also
- [AllocMem](AllocMem) function
diff --git a/docs/Reference/VBA/HiddenModule/GetInheritedOwner.md b/docs/Reference/VBA/HiddenModule/GetInheritedOwner.md
index 0a9e9fa6..7bcf2c59 100644
--- a/docs/Reference/VBA/HiddenModule/GetInheritedOwner.md
+++ b/docs/Reference/VBA/HiddenModule/GetInheritedOwner.md
@@ -15,3 +15,20 @@ Syntax: **GetInheritedOwner(** *Value* **)** **As Object**
For controls that participate in a control-container hierarchy, the inherited owner is the topmost owning object that supplies ambient settings --- typically the form. Returns **Nothing** when no inherited owner is set.
+### Example
+
+This example reads the topmost container of a control and reports its type.
+
+```tb
+' Inside a VB control class
+Dim host As Object
+host = GetInheritedOwner(Me)
+If Not host Is Nothing Then
+ Debug.Print "Container: " & TypeName(host)
+End If
+```
+
+### See Also
+
+- [vbaCastObj](vbaCastObj) function
+
diff --git a/docs/Reference/VBA/HiddenModule/GetMem2.md b/docs/Reference/VBA/HiddenModule/GetMem2.md
index 609d47b5..06dd0547 100644
--- a/docs/Reference/VBA/HiddenModule/GetMem2.md
+++ b/docs/Reference/VBA/HiddenModule/GetMem2.md
@@ -18,6 +18,18 @@ Syntax: **GetMem2** *Address* **,** *retVal*
The bytes are interpreted in the host's native byte order --- little-endian on x86 and x64. The address is read directly with no bounds or alignment check.
+### Example
+
+This example writes a 16-bit value to a buffer and reads it back with **GetMem2**.
+
+```tb
+Dim buf As LongPtr = AllocMem(4)
+PutMem2 buf, &H1234
+Dim v As Integer
+GetMem2 buf, v ' v = &H1234
+FreeMem buf
+```
+
### See Also
- [GetMem1](GetMem1), [GetMem4](GetMem4), [GetMem8](GetMem8), [GetMemPtr](GetMemPtr) procedures
diff --git a/docs/Reference/VBA/HiddenModule/GetMem4.md b/docs/Reference/VBA/HiddenModule/GetMem4.md
index e6d1daf3..15984e1e 100644
--- a/docs/Reference/VBA/HiddenModule/GetMem4.md
+++ b/docs/Reference/VBA/HiddenModule/GetMem4.md
@@ -18,6 +18,18 @@ Syntax: **GetMem4** *Address* **,** *retVal*
The bytes are interpreted in the host's native byte order --- little-endian on x86 and x64. The address is read directly with no bounds or alignment check.
+### Example
+
+This example writes a 32-bit value to a buffer and reads it back with **GetMem4**.
+
+```tb
+Dim buf As LongPtr = AllocMem(4)
+PutMem4 buf, &H12345678
+Dim v As Long
+GetMem4 buf, v ' v = &H12345678
+FreeMem buf
+```
+
### See Also
- [GetMem1](GetMem1), [GetMem2](GetMem2), [GetMem8](GetMem8), [GetMemPtr](GetMemPtr) procedures
diff --git a/docs/Reference/VBA/HiddenModule/GetMem8.md b/docs/Reference/VBA/HiddenModule/GetMem8.md
index a0d303b1..912c4981 100644
--- a/docs/Reference/VBA/HiddenModule/GetMem8.md
+++ b/docs/Reference/VBA/HiddenModule/GetMem8.md
@@ -20,6 +20,19 @@ Syntax: **GetMem8** *Address* **,** *retVal*
The address is read directly with no bounds or alignment check.
+### Example
+
+This example writes an 8-byte value to a buffer and reads it back with **GetMem8**.
+
+```tb
+Dim buf As LongPtr = AllocMem(8)
+Dim src As Currency = 1000000@
+PutMem8 buf, src
+Dim dst As Currency
+GetMem8 buf, dst ' dst = src (same raw 8-byte pattern)
+FreeMem buf
+```
+
### See Also
- [GetMem1](GetMem1), [GetMem2](GetMem2), [GetMem4](GetMem4), [GetMemPtr](GetMemPtr) procedures
diff --git a/docs/Reference/VBA/HiddenModule/PutMem1.md b/docs/Reference/VBA/HiddenModule/PutMem1.md
index 5d1089d3..9c550aaa 100644
--- a/docs/Reference/VBA/HiddenModule/PutMem1.md
+++ b/docs/Reference/VBA/HiddenModule/PutMem1.md
@@ -18,6 +18,18 @@ Syntax: **PutMem1** *Address* **,** *Value*
The address is written directly with no bounds or alignment check. Writing to an address that does not belong to the process, or one that points into read-only memory, will crash the host.
+### Example
+
+This example writes a single byte to a buffer and reads it back.
+
+```tb
+Dim buf As LongPtr = AllocMem(4)
+PutMem1 buf, &HFF
+Dim b As Byte
+GetMem1 buf, b ' b = &HFF
+FreeMem buf
+```
+
### See Also
- [PutMem2](PutMem2), [PutMem4](PutMem4), [PutMem8](PutMem8), [PutMemPtr](PutMemPtr) procedures
diff --git a/docs/Reference/VBA/HiddenModule/PutMem2.md b/docs/Reference/VBA/HiddenModule/PutMem2.md
index cb090693..8e04fdc5 100644
--- a/docs/Reference/VBA/HiddenModule/PutMem2.md
+++ b/docs/Reference/VBA/HiddenModule/PutMem2.md
@@ -18,6 +18,18 @@ Syntax: **PutMem2** *Address* **,** *Value*
The bytes are written in the host's native byte order --- little-endian on x86 and x64. The address is written directly with no bounds or alignment check.
+### Example
+
+This example writes a 16-bit value to a buffer and reads it back.
+
+```tb
+Dim buf As LongPtr = AllocMem(4)
+PutMem2 buf, &H1234
+Dim v As Integer
+GetMem2 buf, v ' v = &H1234
+FreeMem buf
+```
+
### See Also
- [PutMem1](PutMem1), [PutMem4](PutMem4), [PutMem8](PutMem8), [PutMemPtr](PutMemPtr) procedures
diff --git a/docs/Reference/VBA/HiddenModule/PutMem4.md b/docs/Reference/VBA/HiddenModule/PutMem4.md
index c9466f22..f9323170 100644
--- a/docs/Reference/VBA/HiddenModule/PutMem4.md
+++ b/docs/Reference/VBA/HiddenModule/PutMem4.md
@@ -18,6 +18,18 @@ Syntax: **PutMem4** *Address* **,** *Value*
The bytes are written in the host's native byte order --- little-endian on x86 and x64. The address is written directly with no bounds or alignment check.
+### Example
+
+This example writes a 32-bit value to a buffer and reads it back.
+
+```tb
+Dim buf As LongPtr = AllocMem(4)
+PutMem4 buf, &H12345678
+Dim v As Long
+GetMem4 buf, v ' v = &H12345678
+FreeMem buf
+```
+
### See Also
- [PutMem1](PutMem1), [PutMem2](PutMem2), [PutMem8](PutMem8), [PutMemPtr](PutMemPtr) procedures
diff --git a/docs/Reference/VBA/HiddenModule/PutMem8.md b/docs/Reference/VBA/HiddenModule/PutMem8.md
index 0c0c600b..cf4155e4 100644
--- a/docs/Reference/VBA/HiddenModule/PutMem8.md
+++ b/docs/Reference/VBA/HiddenModule/PutMem8.md
@@ -20,6 +20,19 @@ Syntax: **PutMem8** *Address* **,** *Value*
The address is written directly with no bounds or alignment check.
+### Example
+
+This example writes an 8-byte value to a buffer and reads it back.
+
+```tb
+Dim buf As LongPtr = AllocMem(8)
+Dim src As Currency = 1000000@
+PutMem8 buf, src
+Dim dst As Currency
+GetMem8 buf, dst ' dst = src (same raw 8-byte pattern)
+FreeMem buf
+```
+
### See Also
- [PutMem1](PutMem1), [PutMem2](PutMem2), [PutMem4](PutMem4), [PutMemPtr](PutMemPtr) procedures
diff --git a/docs/Reference/VBA/HiddenModule/PutMemPtr.md b/docs/Reference/VBA/HiddenModule/PutMemPtr.md
index 775acd06..2f26cc95 100644
--- a/docs/Reference/VBA/HiddenModule/PutMemPtr.md
+++ b/docs/Reference/VBA/HiddenModule/PutMemPtr.md
@@ -18,6 +18,19 @@ Syntax: **PutMemPtr** *Address* **,** *Value*
The number of bytes written matches the host's pointer width --- four bytes in 32-bit builds, eight bytes in 64-bit builds. The bytes are written in the host's native byte order. The address is written directly with no bounds or alignment check.
+### Example
+
+This example stores a pointer in a buffer and reads it back.
+
+```tb
+Dim buf As LongPtr = AllocMem(8) ' large enough for a pointer on any platform
+Dim target As Long = 42
+PutMemPtr buf, VarPtr(target) ' store the address of target
+Dim p As LongPtr
+GetMemPtr buf, p ' p = address of target
+FreeMem buf
+```
+
### See Also
- [PutMem1](PutMem1), [PutMem2](PutMem2), [PutMem4](PutMem4), [PutMem8](PutMem8) procedures
diff --git a/docs/Reference/VBA/HiddenModule/vbaCopyBytesZero.md b/docs/Reference/VBA/HiddenModule/vbaCopyBytesZero.md
index d81169f1..cfa80781 100644
--- a/docs/Reference/VBA/HiddenModule/vbaCopyBytesZero.md
+++ b/docs/Reference/VBA/HiddenModule/vbaCopyBytesZero.md
@@ -21,6 +21,22 @@ Syntax: **vbaCopyBytesZero(** *Length* **,** *Dest* **,** *Src* **)** **As LongP
Equivalent to a [**vbaCopyBytes**](vbaCopyBytes) followed by a memory clear of the source. Useful when moving an owning resource (a BSTR, an interface pointer) without leaving a duplicate behind. The return value is *Dest*.
+### Example
+
+This example copies four bytes from one buffer to another, then confirms the source is zeroed.
+
+```tb
+Dim src As LongPtr = AllocMem(8)
+Dim dst As LongPtr = AllocMem(8)
+PutMem4 src, &H12345678
+vbaCopyBytesZero 4, dst, src ' copy; src bytes are zeroed
+Dim v As Long
+GetMem4 dst, v ' v = &H12345678
+GetMem4 src, v ' v = 0 (source was cleared)
+FreeMem src
+FreeMem dst
+```
+
### See Also
- [vbaCopyBytes](vbaCopyBytes) function
diff --git a/docs/Reference/VBA/HiddenModule/vbaRefVarAry.md b/docs/Reference/VBA/HiddenModule/vbaRefVarAry.md
index 6355febf..a71a5389 100644
--- a/docs/Reference/VBA/HiddenModule/vbaRefVarAry.md
+++ b/docs/Reference/VBA/HiddenModule/vbaRefVarAry.md
@@ -17,6 +17,19 @@ The returned address is the location of the **SAFEARRAY*** field inside the **Va
If *Variant* does not contain an array, the result is undefined.
+### Example
+
+This example retrieves the address of the **SAFEARRAY** descriptor inside a **Variant** array.
+
+```tb
+Dim v As Variant
+v = Array(10, 20, 30) ' Variant holding an array
+Dim pSAPtr As LongPtr
+pSAPtr = vbaRefVarAry(v) ' address of the SAFEARRAY* field in v
+Dim pSA As LongPtr
+GetMemPtr pSAPtr, pSA ' dereference: pSA is the SAFEARRAY pointer
+```
+
### See Also
- [VarPtr](VarPtr) function
diff --git a/docs/Reference/VBA/Information/IsArrayInitialized.md b/docs/Reference/VBA/Information/IsArrayInitialized.md
index 00a8ae41..3980b9db 100644
--- a/docs/Reference/VBA/Information/IsArrayInitialized.md
+++ b/docs/Reference/VBA/Information/IsArrayInitialized.md
@@ -33,4 +33,6 @@ Debug.Print IsArrayInitialized(a) ' False β Erase released the storage.
### See Also
- [IsArray](IsArray) function
+- [IsObject](IsObject) function
+- [IsEmpty](IsEmpty) function
- [LBound](LBound), [UBound](UBound) functions
diff --git a/docs/Reference/VBA/Interaction/Beep.md b/docs/Reference/VBA/Interaction/Beep.md
index 4adf3070..cb7f0248 100644
--- a/docs/Reference/VBA/Interaction/Beep.md
+++ b/docs/Reference/VBA/Interaction/Beep.md
@@ -24,4 +24,10 @@ Dim I%
For I = 1 To 3 ' Loop 3 times.
Beep ' Sound a tone.
Next I
-```
\ No newline at end of file
+```
+
+### See Also
+
+- [DoEvents](DoEvents) function
+- [Shell](Shell) function
+- [MsgBox](MsgBox) function
\ No newline at end of file
diff --git a/docs/Reference/VBA/Interaction/Command.md b/docs/Reference/VBA/Interaction/Command.md
index b53dff6d..b8e4379c 100644
--- a/docs/Reference/VBA/Interaction/Command.md
+++ b/docs/Reference/VBA/Interaction/Command.md
@@ -61,3 +61,8 @@ Function GetCommandLine(Optional MaxArgs As Variant) As Variant
GetCommandLine = ArgArray()
End Function
```
+
+### See Also
+
+- [Shell](Shell) function
+- [Environ](Environ) function
diff --git a/docs/Reference/VBA/Math/Atn.md b/docs/Reference/VBA/Math/Atn.md
index 038933e6..0e6d6e2f 100644
--- a/docs/Reference/VBA/Math/Atn.md
+++ b/docs/Reference/VBA/Math/Atn.md
@@ -21,6 +21,16 @@ The range of the result is -pi/2 to pi/2 radians. To convert degrees to radians,
> [!NOTE]
> **Atn** is the inverse trigonometric function of [**Tan**](Tan), which takes an angle as its argument and returns the ratio of two sides of a right triangle. Do not confuse **Atn** with the cotangent, which is the simple inverse of a tangent (1/tangent).
+### Example
+
+This example uses **Atn** to derive an approximation of pi.
+
+```tb
+Const Pi As Double = Atn(1) * 4 ' pi β 3.14159265358979
+Debug.Print Pi
+Debug.Print Pi / 180 ' one degree in radians β 0.0174532925199433
+```
+
### See Also
- [Cos](Cos), [Sin](Sin), [Tan](Tan) functions
diff --git a/docs/Reference/VBA/Math/Log.md b/docs/Reference/VBA/Math/Log.md
index 405f1864..d2837e63 100644
--- a/docs/Reference/VBA/Math/Log.md
+++ b/docs/Reference/VBA/Math/Log.md
@@ -43,3 +43,4 @@ MyLog = Log(MyAngle + Sqr(MyAngle * MyAngle + 1))
### See Also
- [Exp](Exp) function
+- [Sqr](Sqr) function
diff --git a/docs/Reference/VBA/Math/Round.md b/docs/Reference/VBA/Math/Round.md
index 19eab13c..17a24c28 100644
--- a/docs/Reference/VBA/Math/Round.md
+++ b/docs/Reference/VBA/Math/Round.md
@@ -29,3 +29,10 @@ Debug.Print Round(0.12355, 4) ' 0.1236
Debug.Print Round(0.12365, 4) ' 0.1236
Debug.Print Round(0.00005, 4) ' 0
```
+
+### See Also
+
+- [Int](../Conversion/Int) function
+- [Fix](../Conversion/Fix) function
+- [CInt](../Conversion/CInt) function
+- [CLng](../Conversion/CLng) function
diff --git a/docs/Reference/VBA/Math/Sqr.md b/docs/Reference/VBA/Math/Sqr.md
index cf8655f2..787efb8d 100644
--- a/docs/Reference/VBA/Math/Sqr.md
+++ b/docs/Reference/VBA/Math/Sqr.md
@@ -25,3 +25,8 @@ MySqr = Sqr(23) ' Returns 4.79583152331272.
MySqr = Sqr(0) ' Returns 0.
MySqr = Sqr(-4) ' Generates a run-time error.
```
+
+### See Also
+
+- [Exp](Exp) function
+- [Log](Log) function
diff --git a/docs/Reference/VBA/Strings/FormatDateTime.md b/docs/Reference/VBA/Strings/FormatDateTime.md
index f2d88413..aa81bb81 100644
--- a/docs/Reference/VBA/Strings/FormatDateTime.md
+++ b/docs/Reference/VBA/Strings/FormatDateTime.md
@@ -27,6 +27,18 @@ The *namedFormat* argument has the following settings:
| **vbLongTime** | 3 | Display a time by using the time format specified in the system regional settings. |
| **vbShortTime** | 4 | Display a time by using the 24-hour format (`hh:mm`). |
+### Example
+
+This example uses **FormatDateTime** to display a date value in several formats.
+
+```tb
+Dim d As Date
+d = #2026-05-29#
+Debug.Print FormatDateTime(d, vbLongDate) ' e.g. "Friday, May 29, 2026"
+Debug.Print FormatDateTime(d, vbShortDate) ' e.g. "05/29/2026"
+Debug.Print FormatDateTime(d, vbLongTime) ' e.g. "12:00:00 AM"
+```
+
### See Also
- [Format](Format), [MonthName](MonthName), [WeekdayName](WeekdayName) functions
diff --git a/docs/Reference/VBA/Strings/InStrRev.md b/docs/Reference/VBA/Strings/InStrRev.md
index 7790f0cd..b5e97e83 100644
--- a/docs/Reference/VBA/Strings/InStrRev.md
+++ b/docs/Reference/VBA/Strings/InStrRev.md
@@ -48,6 +48,16 @@ The *compare* argument can have the following values:
**InStrRev** will not find an instance of *stringmatch* unless the position of the end character of *stringmatch* is less than or equal to *start*.
+### Example
+
+This example uses **InStrRev** to find the last occurrence of a substring.
+
+```tb
+Debug.Print InStrRev("a.b.c", ".") ' 4 β last dot
+Debug.Print InStrRev("a.b.c", ".", 3) ' 2 β last dot at or before position 3
+Debug.Print InStrRev("a.b.c", "x") ' 0 β not found
+```
+
### See Also
- [InStr](InStr) function
diff --git a/docs/Reference/VBA/Strings/Join.md b/docs/Reference/VBA/Strings/Join.md
index 3e8680bf..42145245 100644
--- a/docs/Reference/VBA/Strings/Join.md
+++ b/docs/Reference/VBA/Strings/Join.md
@@ -17,6 +17,16 @@ Syntax: **Join(** *sourcearray* [ **,** *delimiter* ] **)**
*delimiter*
: *optional* String character used to separate the substrings in the returned string. If omitted, the space character (`" "`) is used. If *delimiter* is a zero-length string (`""`), all items in the list are concatenated with no delimiters.
+### Example
+
+This example uses **Join** to concatenate an array of strings with a delimiter.
+
+```tb
+Debug.Print Join(Array("one", "two", "three"), ", ") ' "one, two, three"
+Debug.Print Join(Array("a", "b", "c"), "-") ' "a-b-c"
+Debug.Print Join(Array("x", "y"), "") ' "xy"
+```
+
### See Also
- [Filter](Filter), [Split](Split) functions
diff --git a/docs/Reference/VBA/Strings/MonthName.md b/docs/Reference/VBA/Strings/MonthName.md
index 51a6970c..832d53de 100644
--- a/docs/Reference/VBA/Strings/MonthName.md
+++ b/docs/Reference/VBA/Strings/MonthName.md
@@ -17,6 +17,16 @@ Syntax: **MonthName(** *month* [ **,** *abbreviate* ] **)**
*abbreviate*
: *optional* **Boolean** value that indicates if the month name is to be abbreviated. If omitted, the default is **False**, which means that the month name is not abbreviated.
+### Example
+
+This example uses **MonthName** to return the full and abbreviated name of a month.
+
+```tb
+Debug.Print MonthName(3) ' "March"
+Debug.Print MonthName(3, True) ' "Mar"
+Debug.Print MonthName(12) ' "December"
+```
+
### See Also
- [FormatDateTime](FormatDateTime), [WeekdayName](WeekdayName) functions
diff --git a/docs/Reference/VBA/Strings/StrReverse.md b/docs/Reference/VBA/Strings/StrReverse.md
index 8c2cc9f9..329f798c 100644
--- a/docs/Reference/VBA/Strings/StrReverse.md
+++ b/docs/Reference/VBA/Strings/StrReverse.md
@@ -13,3 +13,13 @@ Syntax: **StrReverse(** *expression* **)**
*expression*
: *required* The string whose characters are to be reversed. If *expression* is a zero-length string (`""`), a zero-length string is returned. If *expression* is **Null**, an error occurs.
+
+### Example
+
+This example uses **StrReverse** to reverse the character order of a string.
+
+```tb
+Debug.Print StrReverse("hello") ' "olleh"
+Debug.Print StrReverse("racecar") ' "racecar"
+Debug.Print StrReverse("AB") ' "BA"
+```
diff --git a/docs/Reference/VBA/Strings/WeekdayName.md b/docs/Reference/VBA/Strings/WeekdayName.md
index 78b5b65d..c3cc57df 100644
--- a/docs/Reference/VBA/Strings/WeekdayName.md
+++ b/docs/Reference/VBA/Strings/WeekdayName.md
@@ -33,6 +33,16 @@ The *firstdayofweek* argument can have the following values:
| **vbFriday** | 6 | Friday |
| **vbSaturday** | 7 | Saturday |
+### Example
+
+This example uses **WeekdayName** to return the full and abbreviated name of a weekday.
+
+```tb
+Debug.Print WeekdayName(2) ' "Monday" (vbSunday = first day of week)
+Debug.Print WeekdayName(2, True) ' "Mon"
+Debug.Print WeekdayName(1) ' "Sunday"
+```
+
### See Also
- [FormatDateTime](FormatDateTime), [MonthName](MonthName) functions
diff --git a/docs/Reference/VBRUN/AmbientProperties/BackColor.md b/docs/Reference/VBRUN/AmbientProperties/BackColor.md
index d886f4d5..ebe40ef3 100644
--- a/docs/Reference/VBRUN/AmbientProperties/BackColor.md
+++ b/docs/Reference/VBRUN/AmbientProperties/BackColor.md
@@ -15,6 +15,19 @@ Syntax: *object*.**BackColor**
A control that does not have its own background colour explicitly set should paint its background using this colour, so that it blends in with the surrounding container. The value is an **OLE_COLOR**: an RGB value, a system-colour reference, or a palette-index reference. Pass it through [**TranslateColor**](../../../Modules/Information/TranslateColor) to obtain a plain RGB value if needed.
+### Example
+
+This example responds to an ambient **BackColor** change and applies it to the control's background.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "BackColor"
+ UserControl.BackColor = Ambient.BackColor
+ End Select
+End Sub
+```
+
### See Also
- [ForeColor](ForeColor) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/DisplayAsDefault.md b/docs/Reference/VBRUN/AmbientProperties/DisplayAsDefault.md
index 04b7027a..f587f801 100644
--- a/docs/Reference/VBRUN/AmbientProperties/DisplayAsDefault.md
+++ b/docs/Reference/VBRUN/AmbientProperties/DisplayAsDefault.md
@@ -15,6 +15,19 @@ Syntax: *object*.**DisplayAsDefault**
The default control on a form is the one activated when the user presses **Enter** without first giving focus to another control --- most often a command button. A control that wants to advertise its default-button status should paint itself with the heavier border or other distinguishing visual when **DisplayAsDefault** is **True**.
+### Example
+
+This example responds to a **DisplayAsDefault** change and triggers a repaint to update the button border.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "DisplayAsDefault"
+ UserControl.Refresh ' repaint to show or remove the default-button border
+ End Select
+End Sub
+```
+
### See Also
- [ShowGrabHandles](ShowGrabHandles) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/DisplayName.md b/docs/Reference/VBRUN/AmbientProperties/DisplayName.md
index f4dd95ee..0eece4dd 100644
--- a/docs/Reference/VBRUN/AmbientProperties/DisplayName.md
+++ b/docs/Reference/VBRUN/AmbientProperties/DisplayName.md
@@ -15,6 +15,19 @@ Syntax: *object*.**DisplayName**
The host typically returns the name by which the user identifies the control --- for example `"Form1!Command1"` in a designer, or whatever label has been chosen at run time. A control can include this string in error messages, log entries, or property browsers so that the user can tell which instance the message refers to.
+### Example
+
+This example responds to a **DisplayName** change and updates the control's tooltip.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "DisplayName"
+ ToolTipText = Ambient.DisplayName
+ End Select
+End Sub
+```
+
### See Also
- [LocaleID](LocaleID) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/Font.md b/docs/Reference/VBRUN/AmbientProperties/Font.md
index f48b6c95..55f5c798 100644
--- a/docs/Reference/VBRUN/AmbientProperties/Font.md
+++ b/docs/Reference/VBRUN/AmbientProperties/Font.md
@@ -15,6 +15,19 @@ Syntax: *object*.**Font**
A control that does not have its own font explicitly set should display text using this font, so that its captions and labels match the typography of the surrounding container. The returned **IFontDisp** exposes properties such as **Name**, **Size**, **Bold**, **Italic**, and **Underline**.
+### Example
+
+This example responds to an ambient **Font** change and applies it to the control's caption font.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "Font"
+ Set UserControl.Font = Ambient.Font
+ End Select
+End Sub
+```
+
### See Also
- [BackColor](BackColor) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/ForeColor.md b/docs/Reference/VBRUN/AmbientProperties/ForeColor.md
index 33c12ae3..b8c401f9 100644
--- a/docs/Reference/VBRUN/AmbientProperties/ForeColor.md
+++ b/docs/Reference/VBRUN/AmbientProperties/ForeColor.md
@@ -15,6 +15,19 @@ Syntax: *object*.**ForeColor**
A control that does not have its own foreground colour explicitly set should draw its text and other foreground elements using this colour, so that it remains legible against the container's [**BackColor**](BackColor). The value is an **OLE_COLOR**: an RGB value, a system-colour reference, or a palette-index reference. Pass it through [**TranslateColor**](../../../Modules/Information/TranslateColor) to obtain a plain RGB value if needed.
+### Example
+
+This example responds to an ambient **ForeColor** change and applies it to the control's text color.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "ForeColor"
+ UserControl.ForeColor = Ambient.ForeColor
+ End Select
+End Sub
+```
+
### See Also
- [BackColor](BackColor) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/LocaleID.md b/docs/Reference/VBRUN/AmbientProperties/LocaleID.md
index 2fb6e23d..87e0a10b 100644
--- a/docs/Reference/VBRUN/AmbientProperties/LocaleID.md
+++ b/docs/Reference/VBRUN/AmbientProperties/LocaleID.md
@@ -15,6 +15,21 @@ Syntax: *object*.**LocaleID**
The Locale ID (LCID) is a 32-bit Windows identifier that names a language and a regional formatting convention --- for example `&H0409&` for English (United States) or `&H0407&` for German (Germany). A control should use this value when formatting numbers, dates, currencies, and message text, so that its output matches the language and conventions the host application is presenting to the user.
+### Example
+
+This example caches the ambient **LocaleID** for use when formatting numbers and dates.
+
+```tb
+Private mLocaleID As Long
+
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "LocaleID"
+ mLocaleID = Ambient.LocaleID
+ End Select
+End Sub
+```
+
### See Also
- [DisplayName](DisplayName) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/MessageReflect.md b/docs/Reference/VBRUN/AmbientProperties/MessageReflect.md
index 47681d97..4c17dc8d 100644
--- a/docs/Reference/VBRUN/AmbientProperties/MessageReflect.md
+++ b/docs/Reference/VBRUN/AmbientProperties/MessageReflect.md
@@ -15,6 +15,21 @@ Syntax: *object*.**MessageReflect**
Some Windows notification messages --- such as **WM_COMMAND**, **WM_NOTIFY**, and the **WM_CTLCOLOR\*** family --- are by default delivered to the parent window of the control that produced them. When **MessageReflect** is **True**, the container reflects those notifications back to the control's own window procedure as **OCM_\*** messages, so the control can handle them itself; when **False**, the container handles them and the control will not see them.
+### Example
+
+This example caches the ambient **MessageReflect** flag so the control knows whether to handle reflected messages.
+
+```tb
+Private mMessageReflect As Boolean
+
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "MessageReflect"
+ mMessageReflect = Ambient.MessageReflect
+ End Select
+End Sub
+```
+
### See Also
- [SupportsMnemonics](SupportsMnemonics) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/Palette.md b/docs/Reference/VBRUN/AmbientProperties/Palette.md
index 8965bca9..8a009b68 100644
--- a/docs/Reference/VBRUN/AmbientProperties/Palette.md
+++ b/docs/Reference/VBRUN/AmbientProperties/Palette.md
@@ -15,6 +15,19 @@ Syntax: *object*.**Palette**
The returned object is a picture whose attached palette identifies the colours the host expects to be available. A control rendering on a palette-managed display should use these colours to avoid unwanted palette flashing when its window receives the focus. On modern true-colour displays the palette is rarely meaningful, and most controls can ignore it.
+### Example
+
+This example responds to an ambient **Palette** change by triggering a repaint.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "Palette"
+ UserControl.Refresh ' repaint using the updated palette
+ End Select
+End Sub
+```
+
### See Also
- [BackColor](BackColor) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/RightToLeft.md b/docs/Reference/VBRUN/AmbientProperties/RightToLeft.md
index 2b0d90e7..d105ecff 100644
--- a/docs/Reference/VBRUN/AmbientProperties/RightToLeft.md
+++ b/docs/Reference/VBRUN/AmbientProperties/RightToLeft.md
@@ -15,6 +15,19 @@ Syntax: *object*.**RightToLeft**
The property is **True** when the host is rendering its UI for a right-to-left language such as Arabic or Hebrew, and **False** for left-to-right languages. A control that displays text or directional adornments (scrollbars, tree expanders, alignment defaults) should mirror its layout when this is **True** so that it reads naturally inside an RTL container.
+### Example
+
+This example responds to a **RightToLeft** change and triggers a repaint to mirror the layout.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "RightToLeft"
+ UserControl.Refresh ' repaint with mirrored layout for RTL languages
+ End Select
+End Sub
+```
+
### See Also
- [LocaleID](LocaleID) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/ScaleUnits.md b/docs/Reference/VBRUN/AmbientProperties/ScaleUnits.md
index d7c5f04d..8d1ada59 100644
--- a/docs/Reference/VBRUN/AmbientProperties/ScaleUnits.md
+++ b/docs/Reference/VBRUN/AmbientProperties/ScaleUnits.md
@@ -15,6 +15,19 @@ Syntax: *object*.**ScaleUnits**
Common values include `"Twip"`, `"Pixel"`, `"Inch"`, `"Centimeter"`, `"Millimeter"`, `"Point"`, and `"Character"`, but the container is free to return any string and to localise it for the current language. The value is a hint for display purposes --- for example, in a status bar or a property sheet --- and not a fixed enumeration that should be parsed.
+### Example
+
+This example responds to a **ScaleUnits** change and updates a label in the control's property sheet.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "ScaleUnits"
+ lblUnits.Caption = Ambient.ScaleUnits
+ End Select
+End Sub
+```
+
### See Also
- [LocaleID](LocaleID) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/ShowGrabHandles.md b/docs/Reference/VBRUN/AmbientProperties/ShowGrabHandles.md
index 4502f11a..0c42ea32 100644
--- a/docs/Reference/VBRUN/AmbientProperties/ShowGrabHandles.md
+++ b/docs/Reference/VBRUN/AmbientProperties/ShowGrabHandles.md
@@ -15,6 +15,19 @@ Syntax: *object*.**ShowGrabHandles**
Grab handles are the small squares drawn on the corners and edges of a selected control on a designer surface. A simple control can leave the grab handles to the host and ignore this property; a control that paints its own selection feedback (for example, because it occupies its full client area) should draw them when **ShowGrabHandles** is **True**. The property is generally only meaningful while [**UserMode**](UserMode) is **False**.
+### Example
+
+This example responds to a **ShowGrabHandles** change and repaints the control to show or hide the handles.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "ShowGrabHandles"
+ UserControl.Refresh ' repaint to show or hide selection grab handles
+ End Select
+End Sub
+```
+
### See Also
- [ShowHatching](ShowHatching) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/ShowHatching.md b/docs/Reference/VBRUN/AmbientProperties/ShowHatching.md
index 597a0668..fcbbbfdb 100644
--- a/docs/Reference/VBRUN/AmbientProperties/ShowHatching.md
+++ b/docs/Reference/VBRUN/AmbientProperties/ShowHatching.md
@@ -15,6 +15,19 @@ Syntax: *object*.**ShowHatching**
Selection hatching is the diagonal cross-hatch the IDE draws over an inactive embedded object to make clear it is selected but not yet activated for editing. A control that paints its own selection feedback should overlay a hatching pattern when this property is **True**. As with [**ShowGrabHandles**](ShowGrabHandles), the property is generally only meaningful while [**UserMode**](UserMode) is **False**.
+### Example
+
+This example responds to a **ShowHatching** change and repaints the control to show or hide the selection overlay.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "ShowHatching"
+ UserControl.Refresh ' repaint to show or hide the hatching overlay
+ End Select
+End Sub
+```
+
### See Also
- [ShowGrabHandles](ShowGrabHandles) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/SupportsMnemonics.md b/docs/Reference/VBRUN/AmbientProperties/SupportsMnemonics.md
index c4d379cc..e860042e 100644
--- a/docs/Reference/VBRUN/AmbientProperties/SupportsMnemonics.md
+++ b/docs/Reference/VBRUN/AmbientProperties/SupportsMnemonics.md
@@ -15,6 +15,19 @@ Syntax: *object*.**SupportsMnemonics**
A mnemonic is the underlined letter in a caption such as `&File` --- it gives the user a way to invoke the control with **Alt+F**. When **SupportsMnemonics** is **True**, the container forwards mnemonic keystrokes to the control; the control should then underline its mnemonic letter when displaying the caption. When the property is **False**, the host will not forward mnemonics, and the control should display its caption without underlining.
+### Example
+
+This example responds to a **SupportsMnemonics** change and triggers a repaint to update the caption underlining.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "SupportsMnemonics"
+ UserControl.Refresh ' repaint to underline or suppress the mnemonic character
+ End Select
+End Sub
+```
+
### See Also
- [DisplayAsDefault](DisplayAsDefault) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/TextAlign.md b/docs/Reference/VBRUN/AmbientProperties/TextAlign.md
index a2b7c4d0..1192e8c3 100644
--- a/docs/Reference/VBRUN/AmbientProperties/TextAlign.md
+++ b/docs/Reference/VBRUN/AmbientProperties/TextAlign.md
@@ -23,6 +23,19 @@ A control that displays text and does not have its own alignment explicitly set
| 3 | Right-aligned |
| 4 | Fill |
+### Example
+
+This example responds to a **TextAlign** change and repaints the control with the updated alignment.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "TextAlign"
+ UserControl.Refresh ' repaint with updated text alignment
+ End Select
+End Sub
+```
+
### See Also
- [Font](Font) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/UIDead.md b/docs/Reference/VBRUN/AmbientProperties/UIDead.md
index 5798de36..56782190 100644
--- a/docs/Reference/VBRUN/AmbientProperties/UIDead.md
+++ b/docs/Reference/VBRUN/AmbientProperties/UIDead.md
@@ -15,6 +15,21 @@ Syntax: *object*.**UIDead**
The host sets **UIDead** to **True** when the application is in a state where it cannot meaningfully respond to user input --- most commonly while execution is paused inside the debugger, but also during long modal operations. While **UIDead** is **True** a control should suppress animations, hover effects, and any input it would otherwise process, since the host's main thread cannot deliver a useful follow-up.
+### Example
+
+This example responds to a **UIDead** change and pauses animations while the host is non-responsive.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "UIDead"
+ If Ambient.UIDead Then
+ tmrAnimate.Enabled = False
+ End If
+ End Select
+End Sub
+```
+
### See Also
- [UserMode](UserMode) property
diff --git a/docs/Reference/VBRUN/AmbientProperties/UserMode.md b/docs/Reference/VBRUN/AmbientProperties/UserMode.md
index d38ee36e..89e08391 100644
--- a/docs/Reference/VBRUN/AmbientProperties/UserMode.md
+++ b/docs/Reference/VBRUN/AmbientProperties/UserMode.md
@@ -15,6 +15,19 @@ Syntax: *object*.**UserMode**
This is the most-checked ambient property. A control should consult **UserMode** before doing anything that only makes sense at run time --- connecting to a database, starting a timer, animating its own appearance --- because at design time the host is showing a static representation of the control on a layout surface. When **UserMode** is **False**, the control should also be willing to draw selection adornments such as [**ShowGrabHandles**](ShowGrabHandles) and [**ShowHatching**](ShowHatching) on request.
+### Example
+
+This example responds to a **UserMode** change and enables the animation timer only at runtime.
+
+```tb
+Private Sub UserControl_AmbientChanged(PropertyName As String)
+ Select Case PropertyName
+ Case "UserMode"
+ tmrAnimate.Enabled = Ambient.UserMode ' run timer only in user mode
+ End Select
+End Sub
+```
+
### See Also
- [UIDead](UIDead) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/AsyncType.md b/docs/Reference/VBRUN/AsyncProperty/AsyncType.md
index 560c5c20..864e08e5 100644
--- a/docs/Reference/VBRUN/AsyncProperty/AsyncType.md
+++ b/docs/Reference/VBRUN/AsyncProperty/AsyncType.md
@@ -19,6 +19,20 @@ The value mirrors the *AsyncType* argument passed to **UserControl.AsyncRead** w
- `vbAsyncTypeFile` (1) --- the data is being saved to a temporary file; **Value** holds its path as a **String**.
- `vbAsyncTypeByteArray` (2) --- the data is being delivered as a **Byte** array.
+### Example
+
+This example checks **AsyncType** in the completion event and assigns the result to the appropriate property.
+
+```tb
+Private Sub UserControl_AsyncReadComplete(AsyncProp As AsyncProperty)
+ If AsyncProp.PropertyName = "Picture" Then
+ If AsyncProp.AsyncType = vbAsyncTypePicture Then
+ Set UserControl.Picture = AsyncProp.Value
+ End If
+ End If
+End Sub
+```
+
### See Also
- [Value](Value) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/BytesMax.md b/docs/Reference/VBRUN/AsyncProperty/BytesMax.md
index 8cd090e8..e8ed6cc7 100644
--- a/docs/Reference/VBRUN/AsyncProperty/BytesMax.md
+++ b/docs/Reference/VBRUN/AsyncProperty/BytesMax.md
@@ -15,6 +15,20 @@ Syntax: *object*.**BytesMax**
Used together with [**BytesRead**](BytesRead) to update a progress indicator during an **AsyncReadProgress** event. **BytesMax** can be zero when the server has not advertised a content length --- for example with an HTTP chunked transfer --- in which case the total size is not known until the read completes and a determinate progress bar cannot be shown.
+### Example
+
+This example shows progress as a ratio when the total size is known.
+
+```tb
+Private Sub UserControl_AsyncReadProgress(AsyncProp As AsyncProperty)
+ If AsyncProp.BytesMax > 0 Then
+ Dim pct As Long
+ pct = CLng(AsyncProp.BytesRead * 100 \ AsyncProp.BytesMax)
+ ProgressBar1.Value = pct
+ End If
+End Sub
+```
+
### See Also
- [BytesRead](BytesRead) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/BytesRead.md b/docs/Reference/VBRUN/AsyncProperty/BytesRead.md
index 2fa9da0b..7f6bbf6d 100644
--- a/docs/Reference/VBRUN/AsyncProperty/BytesRead.md
+++ b/docs/Reference/VBRUN/AsyncProperty/BytesRead.md
@@ -15,6 +15,18 @@ Syntax: *object*.**BytesRead**
The value accumulates across successive **AsyncReadProgress** notifications and reaches its final total by the time **AsyncReadComplete** fires. When [**BytesMax**](BytesMax) is non-zero, the ratio `BytesRead / BytesMax` gives the fraction of the read that has completed.
+### Example
+
+This example logs the current download progress using **BytesRead** and **BytesMax**.
+
+```tb
+Private Sub UserControl_AsyncReadProgress(AsyncProp As AsyncProperty)
+ If AsyncProp.PropertyName = "Picture" Then
+ Debug.Print AsyncProp.BytesRead & " / " & AsyncProp.BytesMax
+ End If
+End Sub
+```
+
### See Also
- [BytesMax](BytesMax) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/PropertyName.md b/docs/Reference/VBRUN/AsyncProperty/PropertyName.md
index 9156cc40..8b69b0f6 100644
--- a/docs/Reference/VBRUN/AsyncProperty/PropertyName.md
+++ b/docs/Reference/VBRUN/AsyncProperty/PropertyName.md
@@ -15,6 +15,21 @@ Syntax: *object*.**PropertyName**
The value is the *PropertyName* argument that was passed to **UserControl.AsyncRead** when the read was started. A user control can have several reads pending at once, so an event handler typically uses **PropertyName** in a **Select Case** to decide what to do with [**Value**](Value) when the read completes --- for example, which property of the control to assign the result to.
+### Example
+
+This example uses **PropertyName** to route the completed read to the correct property.
+
+```tb
+Private Sub UserControl_AsyncReadComplete(AsyncProp As AsyncProperty)
+ Select Case AsyncProp.PropertyName
+ Case "Picture"
+ Set UserControl.Picture = AsyncProp.Value
+ Case "Data"
+ mData = AsyncProp.Value
+ End Select
+End Sub
+```
+
### See Also
- [Target](Target) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/Status.md b/docs/Reference/VBRUN/AsyncProperty/Status.md
index a293cd10..22bb4ddb 100644
--- a/docs/Reference/VBRUN/AsyncProperty/Status.md
+++ b/docs/Reference/VBRUN/AsyncProperty/Status.md
@@ -15,6 +15,16 @@ Syntax: *object*.**Status**
The value is a short message such as `"Finding resource"`, `"Connecting"`, or `"Receiving response"`, suitable for display in a status bar or tooltip while the read is in progress. For programmatic logic, examine [**StatusCode**](StatusCode) instead --- its values are stable, whereas **Status** is intended for human consumption and may be localised.
+### Example
+
+This example displays the human-readable status string in a label during a download.
+
+```tb
+Private Sub UserControl_AsyncReadProgress(AsyncProp As AsyncProperty)
+ lblStatus.Caption = AsyncProp.Status
+End Sub
+```
+
### See Also
- [StatusCode](StatusCode) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/StatusCode.md b/docs/Reference/VBRUN/AsyncProperty/StatusCode.md
index 242a0ee3..b2984d16 100644
--- a/docs/Reference/VBRUN/AsyncProperty/StatusCode.md
+++ b/docs/Reference/VBRUN/AsyncProperty/StatusCode.md
@@ -15,6 +15,18 @@ Syntax: *object*.**StatusCode**
The value identifies the step the read is currently on --- `vbAsyncStatusCodeFindingResource`, `vbAsyncStatusCodeConnecting`, `vbAsyncStatusCodeBeginDownloadData`, `vbAsyncStatusCodeEndDownloadData`, and so on. `vbAsyncStatusCodeError` (0) indicates that the read failed; the [**Status**](Status) property contains the matching human-readable description.
+### Example
+
+This example checks **StatusCode** during a download and reports an error when the read fails.
+
+```tb
+Private Sub UserControl_AsyncReadProgress(AsyncProp As AsyncProperty)
+ If AsyncProp.StatusCode = vbAsyncStatusCodeError Then
+ MsgBox "Download failed: " & AsyncProp.Status
+ End If
+End Sub
+```
+
### See Also
- [Status](Status) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/Target.md b/docs/Reference/VBRUN/AsyncProperty/Target.md
index def5995b..c57622bd 100644
--- a/docs/Reference/VBRUN/AsyncProperty/Target.md
+++ b/docs/Reference/VBRUN/AsyncProperty/Target.md
@@ -15,6 +15,16 @@ Syntax: *object*.**Target**
The value is the *Target* argument that was passed to **UserControl.AsyncRead** when the read was started --- typically an absolute or relative URL, but local file paths are also accepted. It is the location the data is being fetched from, and remains the same across every **AsyncReadProgress** notification and the final **AsyncReadComplete** event for that read.
+### Example
+
+This example logs the URL being fetched for each pending read.
+
+```tb
+Private Sub UserControl_AsyncReadProgress(AsyncProp As AsyncProperty)
+ Debug.Print "Fetching " & AsyncProp.PropertyName & " from: " & AsyncProp.Target
+End Sub
+```
+
### See Also
- [PropertyName](PropertyName) property
diff --git a/docs/Reference/VBRUN/AsyncProperty/Value.md b/docs/Reference/VBRUN/AsyncProperty/Value.md
index ea52bbc1..fc164b7f 100644
--- a/docs/Reference/VBRUN/AsyncProperty/Value.md
+++ b/docs/Reference/VBRUN/AsyncProperty/Value.md
@@ -19,6 +19,18 @@ Syntax: *object*.**Value**
- `vbAsyncTypeFile` --- a **String** holding the path of a temporary file containing the downloaded data.
- `vbAsyncTypeByteArray` --- a **Byte** array (`Byte()`) holding the raw bytes.
+### Example
+
+This example reads **Value** in the completion event and assigns the result to the control's **Picture** property.
+
+```tb
+Private Sub UserControl_AsyncReadComplete(AsyncProp As AsyncProperty)
+ If AsyncProp.PropertyName = "Picture" Then
+ Set UserControl.Picture = AsyncProp.Value ' Value is an IPictureDisp
+ End If
+End Sub
+```
+
### See Also
- [AsyncType](AsyncType) property
diff --git a/docs/Reference/VBRUN/DataObject/DataObjectFiles.md b/docs/Reference/VBRUN/DataObject/DataObjectFiles.md
index d2b6fd50..22254502 100644
--- a/docs/Reference/VBRUN/DataObject/DataObjectFiles.md
+++ b/docs/Reference/VBRUN/DataObject/DataObjectFiles.md
@@ -91,6 +91,21 @@ For Each Path In Data.Files
Next Path
```
+### Example
+
+This example iterates the file paths in a **DataObjectFiles** collection received from a shell drag-and-drop.
+
+```tb
+Private Sub Form1_OLEDragDrop(Data As DataObject, Effect As Long, _
+ Button As Integer, Shift As Integer, _
+ X As Single, Y As Single)
+ Dim path As Variant
+ For Each path In Data.Files
+ Debug.Print path
+ Next path
+End Sub
+```
+
## See Also
- [DataObject](.)
diff --git a/docs/Reference/VBRUN/DataObject/DataObjectFormat.md b/docs/Reference/VBRUN/DataObject/DataObjectFormat.md
index 358640d8..99c2f4a0 100644
--- a/docs/Reference/VBRUN/DataObject/DataObjectFormat.md
+++ b/docs/Reference/VBRUN/DataObject/DataObjectFormat.md
@@ -50,6 +50,18 @@ Syntax: *object*.**StorageType** [ **=** *value* ]
Identifies the medium used to transfer the bytes --- a global memory handle, a file path, an `IStream`, an `IStorage`, a GDI handle, a metafile, or an enhanced metafile. The runtime normally negotiates this automatically; setting it directly is only needed when interoperating with another component that requires a specific medium.
+### Example
+
+This example reads the name and type of the first available format on a **DataObject**.
+
+```tb
+If Data.AvailableFormats.Count > 0 Then
+ Dim fmt As DataObjectFormat
+ Set fmt = Data.AvailableFormats.Item(1)
+ Debug.Print fmt.Name & " (" & fmt.FormatType & ")"
+End If
+```
+
## See Also
- [DataObject](.)
diff --git a/docs/Reference/VBRUN/DataObject/DataObjectFormats.md b/docs/Reference/VBRUN/DataObject/DataObjectFormats.md
index dead0de4..15f5d9ce 100644
--- a/docs/Reference/VBRUN/DataObject/DataObjectFormats.md
+++ b/docs/Reference/VBRUN/DataObject/DataObjectFormats.md
@@ -46,6 +46,17 @@ For Each F In Data.AvailableFormats
Next F
```
+### Example
+
+This example lists the name and format type of every format a **DataObject** holds.
+
+```tb
+Dim fmt As DataObjectFormat
+For Each fmt In Data.AvailableFormats
+ Debug.Print fmt.Name & " (" & fmt.FormatType & ")"
+Next fmt
+```
+
## See Also
- [DataObject](.)
diff --git a/docs/Reference/index.md b/docs/Reference/index.md
index 3f29a2bf..99a70738 100644
--- a/docs/Reference/index.md
+++ b/docs/Reference/index.md
@@ -6,3 +6,25 @@ permalink: /Reference
# Reference Section
+The reference is organized into three layers: the language constructs the compiler parses (keywords, statements, operators), the runtime members shipped in the built-in packages (functions, properties, types, classes), and the packages themselves.
+
+**Language constructs and runtime members:**
+
+- [**Categories**](Reference/Categories) -- statements, procedures, and functions grouped by purpose (declarations, control flow, string handling, file I/O, β¦)
+- [**Statements**](Reference/Statements) -- alphabetical index of every language statement
+- [**Procedures and Functions**](Reference/Procedures-and-Functions) -- alphabetical index of every callable runtime member
+- [**Operators**](Reference/Operators) -- arithmetic, comparison, logical, bitwise, and twinBASIC's added operators
+- [**Enumerations**](Reference/Enumerations) -- index of all 141 enumeration types across all twelve packages, grouped by package and A--Z
+- [**Data Types**](Reference/Data-Types) -- storage size, range, and suffix for every intrinsic type (**Boolean** through **Variant**)
+- [**Compiler Constants**](Reference/Compiler-Constants) -- the `#If` symbols the compiler recognises
+- [**Attributes**](../tB/Core/Attributes) -- `[Documentation(...)]`, `[COMCreatable(...)]`, and the rest of the attribute syntax
+- [**twinBASIC Additions**](Reference/twinBASIC-Additions) -- curated list of language and runtime additions beyond standard VBA
+
+**Controls and glossary:**
+
+- [**Controls**](../tB/Controls) -- the standard UI controls grouped by purpose
+- [**Glossary**](../tB/Gloss) -- technical terms used across the docs
+
+**Packages:**
+
+- [**Packages**](../tB/Packages/) -- all twelve built-in packages: the default runtime trio (VBA, VBRUN, VB), the GUI extensions (CustomControls, WinNativeCommonCtls), the browser embeds (WebView2, CEF), the Windows-integration libraries (WinServicesLib, WinEventLogLib, WinNamedPipesLib), and the tooling packages (Assert, tbIDE)
diff --git a/docs/Reference/twinBASIC-Additions.md b/docs/Reference/twinBASIC-Additions.md
new file mode 100644
index 00000000..09efe5ef
--- /dev/null
+++ b/docs/Reference/twinBASIC-Additions.md
@@ -0,0 +1,166 @@
+---
+title: twinBASIC Additions
+parent: Reference Section
+nav_order: 11
+has_toc: false
+permalink: /Reference/twinBASIC-Additions
+---
+
+# twinBASIC Additions
+
+twinBASIC extends the VBA language with new data types, language constructs, operators, runtime functions, and project-level capabilities. This page lists the additions that have a dedicated reference page, grouped by category.
+
+For a broader overview aimed at developers coming from VBA or VB6, see the [welcome page](../).
+
+---
+
+## New data types
+
+| Type | Description | Notes |
+|------|-------------|-------|
+| **LongLong** | 8-byte signed integer | Available in both 32-bit and 64-bit builds; VBA restricts it to 64-bit |
+| **LongPtr** | Pointer-width signed integer | 4 bytes in 32-bit, 8 bytes in 64-bit; use in `Declare` statements |
+| **Decimal** | 128-bit fixed-decimal type | Available as a standalone declared type, not only as a **Variant** subtype |
+
+See [Data Types](Data-Types) for the full type table, and [Features β New Data Types](../Features/Language/Data-Types) for more detail on these three.
+
+---
+
+## New language constructs
+
+### Object-oriented
+
+- [**Interface**](../tB/Core/Interface) -- defines a COM interface using twinBASIC syntax; a class that **Implements** it must provide all members
+- [**CoClass**](../tB/Core/CoClass) -- declares a COM co-class; generates COM registration metadata at compile time
+- [**Inherits**](../tB/Core/Implements) -- makes one class inherit another's implementation (single inheritance only)
+- [**Implements Via**](../tB/Core/Implements) -- an extended form of `Implements` that delegates interface dispatch to a member object instead of requiring per-member forwarding code
+- [**Protected**](../tB/Core/Protected) -- declares a class member accessible to the class and its derived classes; VBA has no equivalent
+
+### Generics
+
+twinBASIC supports generic types and generic modules using the `Of` keyword. A generic class or module takes one or more type parameters at instantiation time --- for example, `EventLog(Of EventIds, Categories)` in the [WinEventLogLib](../tB/Packages/WinEventLogLib/EventLog) package, or `ServiceCreator(Of T)` in [WinServicesLib](../tB/Packages/WinServicesLib/ServiceCreator).
+
+### New declaration keywords
+
+- [**Delegate**](../tB/Core/Delegate) -- declares a typed function-pointer type; enables type-safe `AddressOf` and CDecl callbacks
+- **Enum** member ranges -- enum members can now reference other members by name rather than only literal integers
+
+### Flow control
+
+- [**Continue**](../tB/Core/Continue) -- skips to the next iteration of the enclosing loop (`Continue For`, `Continue Do`, `Continue While`); VBA has no equivalent
+- [**Return**](../tB/Core/Return) -- exits a **Function** or **Property Get** and supplies the return value in one statement; also retains the legacy **GoSub**/**Return** meaning
+
+### Attributes
+
+twinBASIC uses a square-bracket attribute syntax on declarations and modules:
+
+```tb
+[Documentation("Returns the absolute value of n.")]
+[COMCreatable(False)]
+Public Function Abs(ByVal n As Double) As Double
+```
+
+See [Attributes](../tB/Core/Attributes) for the full list, including `[DllExport]`, `[DebugOnly]`, `[WindowsControl]`, `[MustBeQualified]`, `[PreserveSig]`, and more.
+
+### Inline initialisation
+
+Variables can be initialised at the point of declaration:
+
+```tb
+Dim total As Long = 0
+Dim greeting As String = "Hello"
+Dim items() As String = Array("a", "b", "c")
+```
+
+See [Features β Inline Initialization](../Features/Language/Inline-Initialization).
+
+### Parameterised New
+
+`New` accepts constructor arguments when a class exposes an `_Initialize` method with matching parameters:
+
+```tb
+Dim conn As New NamedPipeClientConnection("\\.\pipe\mypipe", token)
+```
+
+See [Features β New](../Features/GUI-Components/New).
+
+---
+
+## New operators
+
+| Operator | Description |
+|----------|-------------|
+| [**AndAlso**](../tB/Core/AndAlso) | Short-circuit logical AND --- the right operand is not evaluated if the left is `False` |
+| [**OrElse**](../tB/Core/OrElse) | Short-circuit logical OR --- the right operand is not evaluated if the left is `True` |
+| [**IsNot**](../tB/Core/IsNot) | Logical inverse of `Is`; `a IsNot b` is equivalent to `Not (a Is b)` |
+| [**LeftShift**](../tB/Core/LeftShift) | Bitwise left shift; `x LeftShift n` shifts x left by n bits |
+| [**RightShift**](../tB/Core/RightShift) | Bitwise right shift; `x RightShift n` shifts x right by n bits |
+
+---
+
+## New runtime functions
+
+These functions exist in the VBA package but have no equivalent in standard VBA --- they are twinBASIC additions:
+
+| Function | Module | Description |
+|----------|--------|-------------|
+| [**CType**](../tB/Modules/Conversion/CType) | Conversion | Explicit cast to a caller-supplied type; syntax `CType(expr, TypeName)` |
+| [**If**](../tB/Modules/Interaction/If) | Interaction | Ternary --- evaluates to one of two values; only the chosen branch is evaluated |
+| [**CallByDispId**](../tB/Modules/Interaction/CallByDispId) | Interaction | Invokes a method or property by its IDispatch dispatch ID |
+| [**RaiseEventByName**](../tB/Modules/Interaction/RaiseEventByName) | Interaction | Raises an event by name, passing arguments as a **Variant** array |
+| [**RaiseEventByName2**](../tB/Modules/Interaction/RaiseEventByName2) | Interaction | Raises an event by name with a variable-length argument list |
+| [**ObjPtr**](../tB/Modules/Information/ObjPtr) | Information | Returns the COM-identity address of an object |
+| [**VarPtr**](../tB/Modules/Information/VarPtr) | Information | Returns the address of a variable |
+| [**StrPtr**](../tB/Modules/Information/StrPtr) | Information | Returns the address of a **String**'s underlying character buffer |
+| [**IsArrayInitialized**](../tB/Modules/Information/IsArrayInitialized) | Information | Returns whether a dynamic array has been dimensioned |
+| [**TranslateColor**](../tB/Modules/Information/TranslateColor) | Information | Translates an OLE colour to a plain RGB value |
+
+Additional low-level memory, threading, and introspection functions are documented in the [HiddenModule](../tB/Modules/HiddenModule/) section.
+
+---
+
+## Project and runtime capabilities
+
+### 64-bit compilation
+
+twinBASIC compiles to either 32-bit or 64-bit native code. The target is set per-project. See [Features β 64-bit Compilation](../Features/64bit) and use `#If Win64 Then` / `#If Win32 Then` to conditionally compile architecture-specific code.
+
+### Static linking (Fusion)
+
+twinBASIC can statically link its runtime into the output EXE, producing a single-file distributable with no separate runtime DLL. See [Features β Fusion](../Features/Fusion).
+
+### Multithreading
+
+twinBASIC supports background threads through the `Thread` API. See [Features β Multithreading](../Features/Advanced/Multithreading).
+
+### Inline assembly
+
+The [**Emit**](../tB/Modules/HiddenModule/Emit) / [**EmitAny**](../tB/Modules/HiddenModule/EmitAny) functions inject raw byte sequences into the code generated for the enclosing procedure. The `[Naked]` attribute suppresses the generated prologue and epilogue. See [Features β Assembly](../Features/Advanced/Assembly).
+
+### Enhanced API declarations
+
+Beyond the standard `Declare`, twinBASIC adds:
+
+- `DeclareWide` --- disables ANSI/Unicode conversion for string arguments
+- `CDecl` calling convention on both declares and regular functions
+- `ByVal` UDT passing
+- Variadic (`CDecl` + `ParamArray ... As Any()`) parameter lists
+
+See [Features β Enhanced API Declarations](../Features/Advanced/API-Declarations).
+
+---
+
+## IDE additions
+
+- **CodeLens** --- inline action bars above procedures ("Run", "Debug", "Test") without leaving the editor. See [Features β CodeLens](../Features/Compiler-IDE/CodeLens).
+- **Package server** (TWINSERV) --- install packages from a central registry without leaving the IDE. See [Features β Importing a package](../Features/Packages/Importing-TWINSERV).
+- **Type inference** --- `Dim x = 1` infers **Long**; `For Each item In collection` infers the element type when the collection is typed. See [Features β Type Inference](../Features/Language/Type-Inference).
+- **Conditional compilation constants** (`#Const`, `#If`) --- a superset of the VBA set; see [Compiler Constants](Compiler-Constants).
+
+---
+
+### See Also
+
+- [Data Types](Data-Types) -- storage sizes and ranges for all intrinsic types
+- [Features](../Features/) -- in-depth coverage of every twinBASIC feature
+- [Categories](Categories) -- statements and procedures grouped by purpose
diff --git a/docs/Tutorials/Forms.md b/docs/Tutorials/Forms.md
new file mode 100644
index 00000000..6ad08cdc
--- /dev/null
+++ b/docs/Tutorials/Forms.md
@@ -0,0 +1,150 @@
+---
+title: Forms basics
+parent: Tutorials
+permalink: /Tutorials/Forms
+---
+
+# Forms basics
+{: .no_toc }
+
+This tutorial builds a small temperature-converter application. By the end you will know how to add standard controls to a form, set their properties at design time and at runtime, write event handlers, and validate user input.
+
+- TOC
+{:toc}
+
+## What you will build
+
+A Standard EXE with one form. The user types a temperature value, selects a direction (Celsius to Fahrenheit or Fahrenheit to Celsius), clicks a button, and sees the result. The finished form looks something like this:
+
+
+
+The worked example is small enough to finish in under ten minutes, but it touches the controls and patterns that appear in almost every VB6-compatible program.
+
+## Step 1: Create the project
+
+Open twinBASIC and choose **File β New Project β Standard EXE**. The IDE creates a new project with one form, `Form1`, already open in the designer.
+
+
+
+## Step 2: Add and arrange controls
+
+The Toolbox panel on the left lists the controls available in the current project. You will need four control types: **Label**, **TextBox**, **Frame** (to group the OptionButtons), **OptionButton**, **CommandButton**, and a second **Label** for the output. If the Toolbox is not visible, open it with **View β Toolbox**.
+
+Double-click a control in the Toolbox to drop it onto the form, or click once in the Toolbox and then drag a rectangle on the form to place and size it.
+
+Add the following controls in order:
+
+| Control | Name | Caption / Text | Purpose |
+|---------|------|----------------|---------|
+| Label | `lblInputPrompt` | `Temperature:` | Prompt for the input field |
+| TextBox | `txtInput` | *(blank)* | User types the temperature value here |
+| Frame | `fraDirection` | `Convert` | Groups the two OptionButtons |
+| OptionButton | `optCtoF` | `Celsius β Fahrenheit` | Direction selector |
+| OptionButton | `optFtoC` | `Fahrenheit β Celsius` | Direction selector |
+| CommandButton | `cmdConvert` | `Convert` | Triggers the calculation |
+| Label | `lblResult` | *(blank)* | Displays the result |
+
+To rename a control, select it and change the **Name** property in the Properties window on the right. Change the displayed text by setting the **Caption** property (for labels, frames, option buttons, and command buttons) or the **Text** property (for text boxes).
+
+> [!NOTE]
+> Place both OptionButtons inside the Frame by dragging them onto the frame rather than onto the form directly. Controls inside a Frame form an exclusive group --- selecting one automatically deselects the others.
+
+### Setting properties at design time
+
+Select `optCtoF` and set its **Value** property to `True` in the Properties window. This makes it the default selection when the form opens.
+
+Select `lblResult` and set its **Font** property. Click the `...` button next to the Font value to open the Font dialog. Choose a size that makes the result easy to read, such as 12 pt.
+
+
+
+## Step 3: Write the event handler
+
+Double-click the `cmdConvert` button in the designer. The IDE switches to the Code Editor and creates a shell for the button's Click event:
+
+```tb
+Private Sub cmdConvert_Click()
+
+End Sub
+```
+
+Fill it in as follows:
+
+```tb
+Private Sub cmdConvert_Click()
+ If Not IsNumeric(txtInput.Text) Then
+ lblResult.Caption = "Please enter a number."
+ Exit Sub
+ End If
+
+ Dim value As Double
+ value = CDbl(txtInput.Text)
+
+ Dim result As Double
+ Dim unit As String
+
+ If optCtoF.Value Then
+ result = value * 9 / 5 + 32
+ unit = "Β°F"
+ Else
+ result = (value - 32) * 5 / 9
+ unit = "Β°C"
+ End If
+
+ lblResult.Caption = Format(result, "0.00") & " " & unit
+End Sub
+```
+
+The handler:
+
+1. Checks that the input is numeric before converting it. [**IsNumeric**](../tB/Modules/Information/IsNumeric) returns `False` for empty strings, letters, or punctuation other than a decimal point or leading minus.
+2. Reads `optCtoF.Value` to determine the direction. Because the two OptionButtons are in the same Frame, exactly one of them is always `True`.
+3. Calls [**Format**](../tB/Modules/Strings/Format) to round the result to two decimal places.
+
+## Step 4: Run the application
+
+Press **F5** (or **Run β Start**). The form appears. Type `100` into the text box, make sure `Celsius β Fahrenheit` is selected, and click **Convert**. The label should show `212.00 Β°F`.
+
+Try switching to `Fahrenheit β Celsius` and converting `32` --- the result should be `0.00 Β°C`.
+
+Close the form to stop the application and return to the IDE.
+
+## Setting properties at runtime
+
+Design-time properties are convenient but limited. You can read and write most control properties from code at any time. Add a `Form_Load` handler to set the form's title bar text and give `lblResult` a starting caption:
+
+```tb
+Private Sub Form_Load()
+ Me.Caption = "Temperature Converter"
+ lblResult.Caption = "Enter a value and click Convert."
+ optCtoF.Value = True ' ensure the default is set in code too
+End Sub
+```
+
+`Me` refers to the current form --- equivalent to writing `Form1` from inside the form's own module.
+
+## Handling the KeyPress event
+
+It is often convenient to trigger the conversion when the user presses **Enter** in the text box, without having to click the button. Double-click `txtInput` in the designer to open the code editor, then select `KeyPress` from the event drop-down at the top right:
+
+```tb
+Private Sub txtInput_KeyPress(KeyAscii As Integer)
+ If KeyAscii = vbKeyReturn Then
+ KeyAscii = 0 ' suppress the beep
+ cmdConvert_Click ' reuse the button's handler
+ End If
+End Sub
+```
+
+[**vbKeyReturn**](../tB/Packages/VBRUN/Constants/KeyCodeConstants) is the constant for the Enter key (ASCII 13). Setting `KeyAscii` to `0` tells the control not to process the keystroke further --- without this, pressing Enter in a TextBox makes a beep on most systems.
+
+## A note on anchoring and docking
+
+The controls added above use absolute positions. If the user resizes the form, the controls stay where you placed them and the layout may look awkward. twinBASIC supports **anchoring** (a control stays a fixed distance from one or more form edges as the form resizes) and **docking** (a control fills an edge or the entire client area).
+
+These behaviours are set through the **Anchor** and **Dock** properties on the VB package controls. See [Features β Anchoring and Docking](../Features/GUI-Components/Anchoring-Docking) for a full explanation.
+
+## Where to go next
+
+- **Windows API** -- calling Win32 functions to read system information and drive platform features: [Calling the Windows API](Windows-API)
+- **Custom controls** -- owner-drawn controls with gradient fills and per-pixel painting: [CustomControls tutorials](CustomControls/)
+- **WebView2** -- embedding the Microsoft Edge browser engine inside a form: [WebView2 tutorials](WebView2/)
diff --git a/docs/Tutorials/Testing-with-Assert.md b/docs/Tutorials/Testing-with-Assert.md
new file mode 100644
index 00000000..e2b176a4
--- /dev/null
+++ b/docs/Tutorials/Testing-with-Assert.md
@@ -0,0 +1,179 @@
+---
+title: Writing unit tests with Assert
+parent: Tutorials
+permalink: /Tutorials/Testing-with-Assert
+---
+
+# Writing unit tests with Assert
+{: .no_toc }
+
+This tutorial shows how to write a small function, add tests for it using the **Assert** package, and run those tests from inside the IDE.
+
+- TOC
+{:toc}
+
+## The Assert package
+
+The [Assert package](../tB/Packages/Assert/) provides three modules --- [**Exact**](../tB/Packages/Assert/Exact), [**Strict**](../tB/Packages/Assert/Strict), and [**Permissive**](../tB/Packages/Assert/Permissive) --- that share the same fifteen-member API:
+
+| Module | String comparison | Numeric datatype must match |
+|--------|-------------------|-----------------------------|
+| **Exact** | Case-sensitive | Yes --- `5` and `5.0` are not equal |
+| **Strict** | Case-sensitive | No |
+| **Permissive** | Case-insensitive | No |
+
+All three compile out of release builds: every member is tagged `[DebugOnly(True)]`, so assertion calls have zero runtime cost in production EXEs. Tests live in the same project as production code and run in the IDE under the full debugger.
+
+The most commonly used members are:
+
+- `Exact.AreEqual expected, actual` -- fails if the two values differ
+- `Exact.IsTrue condition` -- fails if the condition is `False`
+- `Exact.IsFalse condition` -- fails if the condition is `True`
+- `Exact.Fail message` -- unconditionally records a failure
+- `Exact.Succeed` -- explicitly records a pass (useful at the end of conditional paths)
+
+Each failing assertion records the source location, the expected and actual values, and the optional message string. Results appear in the **Debug Console** pane.
+
+## Adding the package
+
+Open **Project β References** (Ctrl+T) β **Available Packages** and tick **Assert**. Click **OK**. The three modules (`Exact`, `Strict`, `Permissive`) are now in scope without any `Imports` statement.
+
+## The function under test
+
+Add a standard **Module** to the project (right-click the project in the Project Explorer, then **Add β Module**). Name it `StringUtils`. Add the following function:
+
+```tb
+' Pads s on the left with padChar until it reaches totalWidth characters.
+' If s is already at or beyond totalWidth, it is returned unchanged.
+Public Function PadLeft(ByVal s As String, _
+ ByVal totalWidth As Long, _
+ Optional ByVal padChar As String = " ") As String
+ If Len(s) >= totalWidth Then
+ PadLeft = s
+ Else
+ PadLeft = String(totalWidth - Len(s), Left$(padChar, 1)) & s
+ End If
+End Function
+```
+
+`PadLeft` is a good test subject: it has a clear specification, an optional parameter with a default, and several distinct edge cases.
+
+## Writing the tests
+
+Add a second module, `TestStringUtils`. Each test is a `Public Sub` that exercises one aspect of the function. Keep each Sub short --- ideally one logical scenario per Sub, named to describe what it checks.
+
+```tb
+Public Sub TestPadLeft_Normal()
+ ' Three spaces prefix "hi" to reach width 5
+ Exact.AreEqual " hi", PadLeft("hi", 5)
+End Sub
+
+Public Sub TestPadLeft_CustomPadChar()
+ ' Zero-pad to width 5
+ Exact.AreEqual "00042", PadLeft("42", 5, "0")
+End Sub
+
+Public Sub TestPadLeft_AtWidth()
+ ' Already at width -- no change
+ Exact.AreEqual "hello", PadLeft("hello", 5)
+End Sub
+
+Public Sub TestPadLeft_ExceedsWidth()
+ ' Already longer than width -- not truncated
+ Exact.AreEqual "toolong", PadLeft("toolong", 5)
+End Sub
+
+Public Sub TestPadLeft_EmptyString()
+ ' Empty input -- result is all padding
+ Exact.AreEqual " ", PadLeft("", 3)
+End Sub
+
+Public Sub TestPadLeft_SingleChar()
+ ' Width of 1, input already 1 char -- no change
+ Exact.AreEqual "x", PadLeft("x", 1)
+End Sub
+```
+
+These tests cover: the normal case, a custom pad character, the at-boundary case, the over-boundary case, an empty input, and a minimal input.
+
+## Running the tests
+
+There are two ways to run a test Sub:
+
+1. **CodeLens** --- place the cursor anywhere inside a test Sub. The CodeLens bar above the `Sub` line shows a `βΆ Run` button. Click it to run that one Sub. The result appears immediately in the **Debug Console**.
+
+2. **F5 from inside the Sub** --- place the cursor inside the Sub and press **F5**. twinBASIC runs the procedure and stops when it returns or when an assertion fails.
+
+To run all tests in a batch, add a runner Sub that calls each test in sequence:
+
+```tb
+Public Sub RunAllTests()
+ TestPadLeft_Normal
+ TestPadLeft_CustomPadChar
+ TestPadLeft_AtWidth
+ TestPadLeft_ExceedsWidth
+ TestPadLeft_EmptyString
+ TestPadLeft_SingleChar
+ Debug.Print "All PadLeft tests passed."
+End Sub
+```
+
+Place the cursor inside `RunAllTests` and press **F5** (or click **βΆ Run** in the CodeLens bar). If any assertion fails, execution stops at the failing line and the Debug Console shows which assertion failed, its expected and actual values, and the source location.
+
+## Testing error paths
+
+Sometimes a function should raise an error for bad input. Test that with `On Error Resume Next` and `Err.Number`:
+
+```tb
+Public Sub TestPadLeft_ZeroWidth()
+ ' A width of 0 is technically valid -- the string is returned unchanged
+ ' if it is already zero-length, and unchanged otherwise.
+ Exact.AreEqual "hi", PadLeft("hi", 0)
+ Exact.AreEqual "", PadLeft("", 0)
+End Sub
+```
+
+If instead you expected the function to raise an error:
+
+```tb
+Public Sub TestSomethingThatShouldRaise()
+ On Error Resume Next
+ SomeFunctionThatRaises 0 ' call that should fail
+ If Err.Number = 0 Then
+ Exact.Fail "expected an error, but none was raised"
+ End If
+ On Error GoTo 0
+End Sub
+```
+
+## Choosing the right module
+
+Use **Exact** by default --- its strictest comparison semantics prevent tests from passing for the wrong reason. Switch to **Strict** or **Permissive** when the code under test is intentionally case-insensitive or when you are comparing values that should be equal regardless of numeric type:
+
+```tb
+' Exact would fail because "hello" β "Hello" (case differs)
+Strict.AreEqual "HELLO", LCase$("HELLO") ' fails -- "hello" β "HELLO"
+Permissive.AreEqual "HELLO", LCase$("HELLO") ' passes -- case-insensitive
+```
+
+The three modules are documented in full at:
+
+- [Exact module](../tB/Packages/Assert/Exact) -- strictest semantics
+- [Strict module](../tB/Packages/Assert/Strict) -- case-sensitive strings, type-lenient numeric
+- [Permissive module](../tB/Packages/Assert/Permissive) -- case-insensitive strings, type-lenient numeric
+
+## Test organisation
+
+As a project grows, keep tests close to the code they exercise. One common convention:
+
+- One production module per concern: `StringUtils`, `DateUtils`, `FileHelpers`, β¦
+- One test module per production module: `TestStringUtils`, `TestDateUtils`, `TestFileHelpers`, β¦
+- A top-level `RunAll` Sub in a `TestRunner` module that calls each module's runner
+
+Because all test Subs are compiled out of release builds (`[DebugOnly(True)]`), this organisation adds no overhead to the shipped executable.
+
+## Where to go next
+
+- **Assert package reference** -- all fifteen members in detail: [Assert package](../tB/Packages/Assert/)
+- **Forms basics** -- building a form to host a small test harness visually: [Forms basics](Forms)
+- **Windows API** -- writing and testing a function that wraps a Declare: [Calling the Windows API](Windows-API)
diff --git a/docs/Tutorials/Windows-API.md b/docs/Tutorials/Windows-API.md
new file mode 100644
index 00000000..73942ddf
--- /dev/null
+++ b/docs/Tutorials/Windows-API.md
@@ -0,0 +1,219 @@
+---
+title: Calling the Windows API
+parent: Tutorials
+permalink: /Tutorials/Windows-API
+---
+
+# Calling the Windows API
+{: .no_toc }
+
+This tutorial demonstrates an end-to-end Windows API call --- writing a `Declare` statement, calling the function, handling the result, and reading error information when things go wrong. By the end you will have a small form that tracks and displays the current mouse cursor position in real time.
+
+- TOC
+{:toc}
+
+## Background
+
+The Windows API is a large set of C functions exposed by system DLLs such as `user32.dll`, `kernel32.dll`, and `gdi32.dll`. VBA and twinBASIC can call these functions directly using a `Declare` statement, which maps an external function into the module's namespace with a typed signature.
+
+The two things that matter most when writing a Declare:
+
+1. **The correct type for every parameter.** A wrong type can pass the wrong number of bytes and corrupt the stack or heap.
+2. **32-bit vs. 64-bit compatibility.** Many Win32 types are pointer-sized; they are 4 bytes in a 32-bit build and 8 bytes in a 64-bit build.
+
+twinBASIC handles both concerns through **LongPtr** (a pointer-width integer) and the `PtrSafe` keyword (which signals that a Declare is safe to use in a 64-bit process).
+
+## The example: tracking mouse coordinates
+
+`GetCursorPos` reads the current screen coordinates of the mouse pointer and writes them into a caller-supplied `POINT` structure. It is a simple, safe function with no side effects --- a good starting point for learning the pattern.
+
+The C prototype from the Windows SDK:
+
+```c
+BOOL GetCursorPos(LPPOINT lpPoint);
+```
+
+- Return value: non-zero on success, zero on failure.
+- The single parameter is a pointer to a `POINT` structure that the function fills.
+
+A twinBASIC translation:
+
+```tb
+Private Type POINT
+ x As Long
+ y As Long
+End Type
+
+Private Declare PtrSafe Function GetCursorPos Lib "user32" _
+ (lpPoint As POINT) As Long
+```
+
+`POINT` contains two 32-bit integer fields. Even in a 64-bit build the fields themselves remain 32-bit --- only pointer values change width. `Long` is correct here.
+
+The parameter `lpPoint As POINT` is passed **ByRef** by default. ByRef means twinBASIC passes the address of the local `POINT` variable to the function, which writes the coordinates back into it through that pointer. This is the standard Windows pattern for output parameters typed as `LP`.
+
+## Step 1: Create the project and form
+
+Create a new Standard EXE project (or open an existing one). On `Form1`, add:
+
+| Control | Name | Caption | Notes |
+|---------|------|---------|-------|
+| Label | `lblCoords` | `(waiting...)` | Shows the current coordinates |
+| Timer | `Timer1` | --- | Set **Interval** to `100` (ms), **Enabled** to `True` |
+
+The Timer fires its `Timer` event every 100 milliseconds. Each firing will call `GetCursorPos` and update the label.
+
+
+
+## Step 2: Add the Declare and the UDT
+
+Open the Code Editor for `Form1`. At the top of the module, before any procedures, add the UDT and the Declare:
+
+```tb
+Private Type POINT
+ x As Long
+ y As Long
+End Type
+
+Private Declare PtrSafe Function GetCursorPos Lib "user32" _
+ (lpPoint As POINT) As Long
+```
+
+> [!NOTE]
+> `PtrSafe` is required on any `Declare` that will be used in a 64-bit build. It tells the compiler that the signature has been reviewed for pointer-width correctness. Including `PtrSafe` on a 32-bit-only project has no effect, so it is good practice to use it everywhere.
+
+## Step 3: Call the function and handle the result
+
+Double-click the Timer control in the designer to generate the `Timer1_Timer` event handler, then fill it in:
+
+```tb
+Private Sub Timer1_Timer()
+ Dim pt As POINT
+ Dim success As Long
+
+ success = GetCursorPos(pt)
+
+ If success <> 0 Then
+ lblCoords.Caption = "X: " & pt.x & " Y: " & pt.y
+ Else
+ lblCoords.Caption = "(error)"
+ End If
+End Sub
+```
+
+`GetCursorPos` returns non-zero when it succeeds and zero when it fails. The `POINT` fields `x` and `y` are valid only when the return is non-zero.
+
+## Step 4: Run the application
+
+Press **F5**. Move the mouse over the form. The label updates ten times per second with the current screen coordinates (in pixels, measured from the top-left corner of the primary monitor).
+
+## Error handling with GetLastError
+
+When a Win32 function returns a failure code, the extended error information is available through `GetLastError` --- another kernel32 function:
+
+```tb
+Private Declare PtrSafe Function GetLastError Lib "kernel32" () As Long
+```
+
+> [!NOTE]
+> In VBA-compatible code you can also read the last Win32 error through [**Err.LastDllError**](../tB/Modules/Information/Err), which is populated automatically after any DLL call. Both return the same value; `Err.LastDllError` does not require an extra Declare.
+
+A robust version of the Timer handler:
+
+```tb
+Private Sub Timer1_Timer()
+ Dim pt As POINT
+
+ If GetCursorPos(pt) <> 0 Then
+ lblCoords.Caption = "X: " & pt.x & " Y: " & pt.y
+ Else
+ lblCoords.Caption = "GetCursorPos failed (error " & Err.LastDllError & ")"
+ End If
+End Sub
+```
+
+In practice `GetCursorPos` almost never fails; checking the return code matters for functions that deal with file handles, network connections, or security contexts where failure is routine.
+
+## 32-bit vs. 64-bit considerations
+
+For `GetCursorPos` the distinction does not arise because all its types are concrete 32-bit integers. Many other API functions use pointer-sized types that require care:
+
+| C type | twinBASIC type | Why |
+|--------|----------------|-----|
+| `HWND`, `HANDLE` | **LongPtr** | Window and object handles are pointer-sized |
+| `HINSTANCE`, `HMODULE` | **LongPtr** | Instance handles are pointer-sized |
+| `LPCWSTR`, `LPWSTR` | **LongPtr** (with StrPtr) or **String** | String pointers are pointer-sized |
+| `DWORD` | **Long** | Always 32-bit |
+| `BOOL` | **Long** | Always 32-bit |
+| `INT`, `int` | **Long** | Always 32-bit |
+
+A Declare that uses `Long` for a handle type compiles and runs in 32-bit mode but fails or crashes in 64-bit mode because a 64-bit handle does not fit in 4 bytes. Always use `LongPtr` for handle and pointer parameters.
+
+### Example: GetForegroundWindow
+
+```tb
+Private Declare PtrSafe Function GetForegroundWindow Lib "user32" () As LongPtr
+
+Private Sub ShowActiveWindow()
+ Dim hwnd As LongPtr
+ hwnd = GetForegroundWindow()
+ MsgBox "Active window handle: " & hwnd
+End Sub
+```
+
+The return type is `LongPtr` because a window handle is pointer-sized. In a 32-bit build `LongPtr` is 4 bytes; in a 64-bit build it is 8 bytes. The same Declare and the same calling code work in both targets without any `#If Win64` conditional.
+
+## ANSI vs. Unicode function variants
+
+Most Win32 text-related functions come in two variants: an ANSI version (suffix `A`) that takes `LPSTR` / `char*` strings, and a Unicode version (suffix `W`) that takes `LPWSTR` / `wchar_t*` strings. twinBASIC strings are Unicode (`BSTR`), so always prefer the `W` variant.
+
+Specify the Unicode function name in the `Alias` clause when the unaliased name would resolve to the ANSI variant:
+
+```tb
+' Without Alias, the linker resolves to the ANSI variant on some systems.
+' Alias forces the Unicode variant explicitly:
+Private Declare PtrSafe Function GetWindowText Lib "user32" _
+ Alias "GetWindowTextW" _
+ (ByVal hwnd As LongPtr, _
+ ByVal lpString As Long, _
+ ByVal nMaxCount As Long) As Long
+```
+
+For functions where twinBASIC can pass a **String** directly, `DeclareWide` is an alternative to manually managing the buffer pointer --- see [Features β Enhanced API Declarations](../Features/Advanced/API-Declarations) for the `DeclareWide` and `CDecl` extensions.
+
+## Putting it together
+
+The full module for the cursor-tracking form:
+
+```tb
+Private Type POINT
+ x As Long
+ y As Long
+End Type
+
+Private Declare PtrSafe Function GetCursorPos Lib "user32" _
+ (lpPoint As POINT) As Long
+
+Private Sub Form_Load()
+ Me.Caption = "Cursor position"
+ lblCoords.Caption = "(waiting...)"
+ Timer1.Interval = 100
+ Timer1.Enabled = True
+End Sub
+
+Private Sub Timer1_Timer()
+ Dim pt As POINT
+
+ If GetCursorPos(pt) <> 0 Then
+ lblCoords.Caption = "X: " & pt.x & " Y: " & pt.y
+ Else
+ lblCoords.Caption = "GetCursorPos failed (error " & Err.LastDllError & ")"
+ End If
+End Sub
+```
+
+## Where to go next
+
+- **Enhanced API Declarations** -- `DeclareWide`, `CDecl`, `ByVal` UDTs, variadic arguments: [Features β Enhanced API Declarations](../Features/Advanced/API-Declarations)
+- **Forms basics** -- the standard VB controls and event model: [Forms basics](Forms)
+- **Unit testing** -- verifying functions that wrap API calls: [Writing unit tests with Assert](Testing-with-Assert)
diff --git a/docs/Tutorials/index.md b/docs/Tutorials/index.md
index b8d5f1eb..1b396e69 100644
--- a/docs/Tutorials/index.md
+++ b/docs/Tutorials/index.md
@@ -4,3 +4,22 @@ permalink: /Tutorials/
nav_order: 3
---
+# Tutorials
+
+Tutorials are step-by-step guides focused on specific topics. For a categorical reference of language constructs, see the [Reference section](../Reference); for feature overviews, see [Features](../Features/).
+
+**Foundations:**
+
+- [**Forms basics**](Forms) -- adding controls to a form, naming conventions, the Properties window, common events, and runtime vs. design-time property changes. Builds a temperature converter.
+- [**Calling the Windows API**](Windows-API) -- writing `Declare` statements, 32/64-bit considerations with `PtrSafe` and `LongPtr`, and reading error information. Tracks the mouse cursor position live.
+- [**Writing unit tests with Assert**](Testing-with-Assert) -- the **Assert** package's three modules, test-Sub patterns, running from the CodeLens bar or F5, and testing error paths.
+
+**Reference topics:**
+
+- [**Arrays**](Arrays) -- fixed and dynamic arrays, `Dim` and `ReDim`, bounds, and multi-dimensional shapes. No prior twinBASIC experience assumed.
+
+**Control and browser embedding:**
+
+- [**CustomControls**](CustomControls/) -- building owner-drawn controls with the `Waynesβ¦` framework: painting, event handling, the property sheet, and the DESIGNER surface.
+- [**WebView2**](WebView2/) -- embedding the Microsoft Edge runtime inside a form: local asset hosting, JavaScript interop, message exchange, and a Monaco-editor case study.
+- [**CEF**](CEF/) -- embedding Chromium inside a form: the same patterns as WebView2 but with a developer-controlled browser runtime that ships alongside the application.
diff --git a/docs/Videos/AccessDevCon.md b/docs/Videos/AccessDevCon.md
index 18fda9cc..2fede9c5 100644
--- a/docs/Videos/AccessDevCon.md
+++ b/docs/Videos/AccessDevCon.md
@@ -54,7 +54,7 @@ Mike Wolfe presents a twinBASIC project update and how to create add-ins for Acc
referrerpolicy="strict-origin-when-cross-origin" allowfullscreen>
-Mike Wolfe presents a session on twinBASIC covering a brief project overwiew, progress, roadmap, demos and Access integration plans.
+Mike Wolfe presents a session on twinBASIC covering a brief project overview, progress, roadmap, demos and Access integration plans.
- For more information see [https://nolongerset.com/tag/twinbasic][5].
[5]: https://nolongerset.com/tag/twinbasic
@@ -71,7 +71,7 @@ Mike Wolfe presents a session on twinBASIC covering a brief project overwiew, pr
referrerpolicy="strict-origin-when-cross-origin" allowfullscreen>
-Mike Wolfe presents the current state of twinBASIC focussing on the practical use and usefullness for Access developers.
+Mike Wolfe presents the current state of twinBASIC focussing on the practical use and usefulness for Access developers.
- For more information, see [https://nolongerset.com/tag/twinbasic][5]
---
diff --git a/docs/Videos/index.md b/docs/Videos/index.md
index 90d83905..c39d50b4 100644
--- a/docs/Videos/index.md
+++ b/docs/Videos/index.md
@@ -5,3 +5,8 @@ permalink: /Videos
---
# Videos
+
+Video recordings documenting the development and use of twinBASIC.
+
+- [**twinBASIC**](Videos/tB) -- the official twinBASIC video series: introductions, compiler feature demonstrations, debugging walkthroughs, the form designer, and the "twinBASIC for Applications" proof of concept.
+- [**Access DevCon**](Videos/AccessDevCon) -- twinBASIC sessions from the annual Access DevCon conference (2021--2025), presented by Microsoft Access MVP Mike Wolfe.
diff --git a/docs/index.md b/docs/index.md
index 765e65e3..8779f7d9 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -15,7 +15,7 @@ Start with the [FAQ](FAQ) for orientation --- what twinBASIC is, where it stands
## Coming from VBA or VB6?
-Most existing VB6 / VBA code compiles unchanged. The [Features overview](Features/) catalogues every addition --- new data types ([**LongLong**](Features/Language/Data-Types#longlong), [**LongPtr**](Features/Language/Data-Types#longptr), [**Decimal**](Features/Language/Data-Types#decimal)), native [**Interface**](tB/Core/Interface) and [**CoClass**](tB/Core/CoClass) definitions, [**Implements Via**](Features/Language/Inheritance#implements-via-for-basic-inheritance) and [**Inherits**](Features/Language/Inheritance#inherits-for-complete-oop), generics, method overloading, type inference, attribute syntax, and more.
+Most existing VB6 / VBA code compiles unchanged. Key additions beyond VBx compatibility: new data types ([**LongLong**](Features/Language/Data-Types#longlong), [**LongPtr**](Features/Language/Data-Types#longptr), [**Decimal**](Features/Language/Data-Types#decimal)), native [**Interface**](tB/Core/Interface) and [**CoClass**](tB/Core/CoClass) declarations, [**Implements Via**](Features/Language/Inheritance#implements-via-for-basic-inheritance) and [**Inherits**](Features/Language/Inheritance#inherits-for-complete-oop) for inheritance, generics, method overloading, type inference, and attribute syntax. The [Features overview](Features/) is the complete catalogue.
## Looking up a keyword, function, or operator?
@@ -75,7 +75,7 @@ The [**IDE section**](tB/IDE) documents the editor, project explorer, debugging
## Community and external resources
- The [**twinBASIC wiki**](https://github.com/twinbasic/documentation/wiki) on GitHub supplements these docs with community contributions and notes on bleeding-edge features.
-- [**twinBASIC Videos**](Videos/tB) --- the twinBASIC video series. The [**Access DevCon**](Videos/AccessDevCon) archive collects twinBASIC update sessions from the annual Access DevCon conference.
+- [**Videos**](Videos/) --- the twinBASIC video series and the [**Access DevCon**](Videos/AccessDevCon) conference sessions.
- Third-party guides by Mike Wolfe at [@nolongerset](https://nolongerset.com):
- [Create a Custom ActiveX Control with twinBASIC](https://nolongerset.com/create-activex-control-with-twinbasic/)
- [Create a Tool Window in the VBIDE with twinBASIC](https://nolongerset.com/create-a-vbe-addin-with-twinbasic/)