Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Merged
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ node_modules/
/before/
/after-*/
/findoverflow-baseline/
indexer/.packages/
61 changes: 0 additions & 61 deletions docs/Reference/Assert/index.md

This file was deleted.

21 changes: 21 additions & 0 deletions docs/Reference/Built-In.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Built-In Packages
parent: Packages
nav_order: 2
permalink: /tB/Packages/Built-In/
has_toc: false
---

# Built-In Packages

These packages are built into twinBASIC and are always available, even offline. To use them, add them to Project → References (Ctrl-T) → Available Packages.

- [Assert Package](../Assert/) -- assertion functions for unit tests -- three modules (**Exact**, **Strict**, **Permissive**) sharing the same fifteen-member API with different comparison strictness
- [CustomControls Package](../CustomControls/) -- owner-drawn `Waynes…` custom controls (button, form, frame, grid, label, slider, textbox, timer), the shared `Styles/` helpers that paint them, and the DESIGNER framework (interfaces, callback objects, **Canvas**, **SerializeInfo**) for authoring new custom controls
- [CEF Package](../CEF/) -- the **CefBrowser** control wrapping the Chromium Embedded Framework: cross-platform-ready browser embedding with a choice of three Chromium runtimes (v49 / v109 / v145); currently in BETA
- [WebView2 Package](../WebView2/) -- the **WebView2** control wrapping the Microsoft Edge runtime, plus its surrounding wrapper objects (request / response / headers / environment options) and the `wv2…` enumerations
- [WinEventLogLib Package](../WinEventLogLib/) -- writes Windows Event Log entries from twinBASIC; the generic **EventLog**(*Of EventIds, Categories*) class handles registration, registry setup, and the per-event `ReportEventW` call, with message-table resources for *EventIds* and *Categories* synthesised into the EXE at compile time
- [WinNamedPipesLib Package](../WinNamedPipesLib/) -- Windows named pipes as twinBASIC objects with an asynchronous IOCP-driven I/O model; **NamedPipeServer** + **NamedPipeServerConnection** on the host side, **NamedPipeClientManager** + **NamedPipeClientConnection** on the client side, with message-boundary semantics and a cookie-based correlation pattern across `AsyncRead` / `AsyncWrite` and their matching events
- [WinServicesLib Package](../WinServicesLib/) -- runs a twinBASIC EXE as one or more Windows services; the **Services** singleton coordinates configuration, install / uninstall, and the SCM dispatcher loop, while user-implemented **ITbService** classes are instantiated through **ServiceCreator**`(Of T)`
- [tbIDE Package](../tbIDE/) -- the **addin SDK** for the twinBASIC IDE: every addin is a Standard DLL that exports `tbCreateCompilerAddin`, returns an object implementing the **AddIn** contract, and from there reaches the IDE's toolbar, tool-window DOM, virtual file system, debug console, current project, keyboard shortcuts, and themes
- [WinNativeCommonCtls Package](../WinNativeCommonCtls/) -- VB6-compatible replacement for **Microsoft Common Controls 6.0** (`MSCOMCTL.OCX`) built on top of the Win32 ComCtl32 controls: eight controls (**DTPicker**, **ImageList**, **ListView**, **MonthView**, **ProgressBar**, **Slider**, **TreeView**, **UpDown**) with the original member names preserved, plus the collection sub-objects and user-facing enumerations
37 changes: 37 additions & 0 deletions docs/Reference/Built-In/AppGlobalClassObject/_App/Build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Build
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/Build
has_toc: false
---
# Build
{: .no_toc }

Returns the build number component of the project version, as configured in the project settings. Read-only.

Syntax: *object*.**Build**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

**Build** returns the fourth component of the four-part version number (*Major*.*Minor*.*Revision*.*Build*) as set in the twinBASIC project settings. Together with [**Major**](Major), [**Minor**](Minor), and [**Revision**](Revision), it allows the running code to inspect its own version at runtime.

> [!NOTE]
>
> **Build** is a twinBASIC-specific property with no equivalent in VBA or VB6.

### Example

This example prints the full version string to the debug console.

```tb
Debug.Print "Version: " & App.Major & "." & App.Minor & "." & App.Revision & "." & App.Build
```

### See Also

- [Major](Major) property
- [Minor](Minor) property
- [Revision](Revision) property
- [EXEName](EXEName) property
35 changes: 35 additions & 0 deletions docs/Reference/Built-In/AppGlobalClassObject/_App/Comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Comments
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/Comments
has_toc: false
---
# Comments
{: .no_toc }

Returns the Comments string from the project's version information. Read-only.

Syntax: *object*.**Comments**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

**Comments** returns the text entered in the **Comments** field of the project's version information. This field is embedded in the compiled executable's `VS_VERSION_INFO` resource and is typically used to record build notes or other free-form text about the release. When running inside the twinBASIC IDE, the value is read from the current project settings.

### Example

This example prints the project's comments string to the debug console.

```tb
Debug.Print "Comments: " & App.Comments
```

### See Also

- [Title](Title) property
- [FileDescription](FileDescription) property
- [LegalCopyright](LegalCopyright) property
- [LegalTrademarks](LegalTrademarks) property
- [CompanyName](CompanyName) property
- [ProductName](ProductName) property
33 changes: 33 additions & 0 deletions docs/Reference/Built-In/AppGlobalClassObject/_App/CompanyName.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: CompanyName
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/CompanyName
has_toc: false
---
# CompanyName
{: .no_toc }

Returns the company name stored in the project's version information. Read-only.

Syntax: *object*.**CompanyName**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

The value is taken from the Company Name field in the project's version information, as set in the twinBASIC project settings. When the field has not been filled in, **CompanyName** returns an empty string.

### Example

This example shows the company name in a message box.

```tb
MsgBox "Company: " & App.CompanyName
```

### See Also

- [ProductName](ProductName) property
- [FileDescription](FileDescription) property
- [LegalCopyright](LegalCopyright) property
- [LegalTrademarks](LegalTrademarks) property
31 changes: 31 additions & 0 deletions docs/Reference/Built-In/AppGlobalClassObject/_App/EXEName.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: EXEName
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/EXEName
has_toc: false
---
# EXEName
{: .no_toc }

Returns the name of the running executable, without the path or file extension. Read-only.

Syntax: *object*.**EXEName**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

For a compiled executable named `MyProject.exe`, **EXEName** returns `"MyProject"`. When running inside the twinBASIC IDE, the value reflects the project name as configured in the project settings.

### Example

This example shows the executable name in a message box.

```tb
MsgBox "Running as: " & App.EXEName
```

### See Also

- [Path](Path) property
- [Title](Title) property
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: FileDescription
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/FileDescription
has_toc: false
---
# FileDescription
{: .no_toc }

Returns the file description string from the project's version information. Read-only.

Syntax: *object*.**FileDescription**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

**FileDescription** returns the value set in the project's **File Description** version-info field. This is the human-readable description of the executable that appears in Windows Explorer's file properties dialog. When no description has been set in the project settings, the property returns an empty string.

### Example

This example displays the file description in a message box.

```tb
MsgBox "File description: " & App.FileDescription
```

### See Also

- [ProductName](ProductName) property
- [CompanyName](CompanyName) property
- [LegalCopyright](LegalCopyright) property
- [Comments](Comments) property
52 changes: 52 additions & 0 deletions docs/Reference/Built-In/AppGlobalClassObject/_App/HelpFile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: HelpFile
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/HelpFile
has_toc: false
---
# HelpFile
{: .no_toc }

Gets or sets the path to the Help file associated with the application.

## Get

Returns a **String** containing the path to the application's Help file.

Syntax: *object*.**HelpFile**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

The value is the path set at design time in the project settings, or any path assigned at run time via the **Let** accessor. Returns an empty string if no Help file has been configured.

## Let

Sets the path to the application's Help file.

Syntax: *object*.**HelpFile** **=** *path*

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

*path*
: A **String** specifying the full or relative path to the Help file. Assign an empty string to clear the setting.

The assigned path is used by the runtime when a Help request is made, for example when the user presses F1 in a dialog. Setting this property at run time overrides the value configured in the project settings for the duration of the session.

### Example

This example assigns a Help file path at startup and then opens it on a specific topic.

```tb
Sub Main()
App.HelpFile = App.Path & "\MyApp.chm"
End Sub
```

### See Also

- [Path](Path) property
- [Title](Title) property
- [EXEName](EXEName) property
35 changes: 35 additions & 0 deletions docs/Reference/Built-In/AppGlobalClassObject/_App/IsInIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: IsInIDE
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/IsInIDE
has_toc: false
---
# IsInIDE
{: .no_toc }

Returns **True** if the code is currently executing inside the twinBASIC IDE, or **False** if it is running as a compiled executable. Read-only.

Syntax: *object*.**IsInIDE**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

Use **IsInIDE** to branch between IDE-only debug behaviour and production behaviour without requiring a conditional compilation constant. Unlike `#If` directives, **IsInIDE** is evaluated at runtime, so the same compiled binary can detect its own run-time context.

### Example

This example skips a lengthy initialisation step when running under the IDE.

```tb
If App.IsInIDE Then
Debug.Print "Skipping hardware initialisation in IDE."
Else
InitialiseHardware
End If
```

### See Also

- [EXEName](EXEName) property
- [Path](Path) property
36 changes: 36 additions & 0 deletions docs/Reference/Built-In/AppGlobalClassObject/_App/LastBuildPath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: LastBuildPath
parent: _App
grand_parent: AppGlobalClassObject Package
permalink: /tB/Packages/AppGlobalClassObject/_App/LastBuildPath
has_toc: false
---
# LastBuildPath
{: .no_toc }

Returns the full path to the output file produced by the most recent build. Read-only.

Syntax: *object*.**LastBuildPath**

*object*
: *required* An object expression that evaluates to an **_App** object. In practice this is the global **App** object.

**LastBuildPath** returns the complete file-system path, including the file name and extension, of the executable or DLL most recently compiled from this project. When no build has been performed in the current IDE session, the property returns an empty string.

> [!NOTE]
>
> **LastBuildPath** is a twinBASIC-specific property with no equivalent in VBA or VB6. It is only meaningful during IDE-hosted execution; in a compiled executable it returns the path of that executable.

### Example

This example prints the last build path to the debug console.

```tb
Debug.Print "Last build: " & App.LastBuildPath
```

### See Also

- [Path](Path) property
- [ModulePath](ModulePath) property
- [EXEName](EXEName) property
Loading