Dialogs, clipboard and platform
Native interactions can be cancelled or denied. Check returned values before doing the next operation.
Read the task-based guide before using an isolated signature. Arguments are positional unless a signature explicitly marks an optional argument.
Destination-platform support#
| Capability | macOS | Windows | Linux · L1 |
|---|---|---|---|
| Desktop export | Apple Silicon / Intel .app | x64 / ARM64 .exe | x64 / ARM64 executable |
| Visual IDE | Runs on macOS | Export destination, not a Windows IDE | Export destination, not a Linux IDE |
| Menus, text clipboard, file/folder dialogs | Supported | Supported; menus in the window | Supported; requires a graphical desktop |
| CommonDialog color, font, printer, page setup | Supported | Supported | Unavailable: error 5 / MCB4415 |
| AudioPlayer | Supported | MCI; installed codecs matter | Unavailable; Play returns False |
| VideoPlayer | Supported sources | Media Foundation; project resources only | Unavailable; placeholder and failure reporting |
| Reports.Print | Native print interaction | Native Windows dialog / GDI | Opens a temporary PDF in the default viewer; not direct printing |
| Custom application icon | Square PNG or ICNS | Square PNG or ICO | Not embedded in the executable |
Dialogs.OpenFile#
An empty result means Cancel.
BASIC-facing contract
Function OpenFile(Optional title As String, Optional filter As String) As StringDialogs.SaveFile#
Select a destination; selecting it does not write the file.
BASIC-facing contract
Function SaveFile(Optional title As String, Optional suggestedName As String, Optional filter As String) As StringDialogs.SelectFolder#
Select a folder or return an empty result on Cancel.
BASIC-facing contract
Function SelectFolder(Optional title As String) As StringClipboard#
These calls act on the system text clipboard. Clearing replaces the user’s clipboard state.
BASIC-facing contract
Sub SetText(text As String)
Function GetText() As String
Function HasText() As Boolean
Sub Clear()Platform#
OpenUrl accepts supported HTTP, HTTPS or mailto URLs; it is not a shell command runner.
BASIC-facing contract
IsMac, IsWindows, IsLinux As Boolean (read only)
Sub OpenUrl(url As String)Source baseline
20f4bfed6b · Build manifestSources & maintenance
Original web explanation, reviewed against these repository sources. API tables and example files follow the implementation.
docs/manual/33-publishing-for-windows.mddocs/manual/34-publishing-for-linux.mdsrc/McBasic.Build/PublishTargets.cssrc/McBasic.Build/PlatformAvailabilityCheck.cssrc/McBasic.Runtime/McPlatformAvailability.cs