# twinBASIC Documentation > twinBASIC is a BASIC language and development environment that aims at full backward compatibility with VB6 and VBA, and adds modern language features: generics, native Interface and CoClass declarations, attributes and a package system. This is its documentation: tutorials, the features it adds, the IDE, the LLVM back end, and the reference for the language, its runtime library and its packages. Every page of this site is also published as markdown, at the page's URL with `.md` added, or `index.md` where the URL ends in `/`. The links below go to the markdown, and so do the markdown's links to other pages. Each page's HTML names its own markdown in ``. To find the page that documents a name, read https://docs.twinbasic.com/tB/symbols.json: every name the reference documents (statements, operators, attributes, and each package's modules, classes, members, enumerations and their values), each with the URL of the page or the heading that documents it, to which `.md` is added as above. https://docs.twinbasic.com/nav.html lists every page, in the order of the site's navigation. - [Welcome](https://docs.twinbasic.com/index.md): twinBASIC is a new BASIC language and development environment aiming for 100% backward compatibility with VB6 and VBA, while adding modern language features — generics, native Interface and CoClass declarations, attributes, and a package… - [Frequently Asked Questions](https://docs.twinbasic.com/FAQ.md): Answers common questions about twinBASIC: what it is, where it stands and what it costs, how to install it, and how to bring VB6 projects and controls to it. - [Downloads](https://docs.twinbasic.com/Downloads.md): Lists the tools, offline copies and test projects this documentation publishes, each with a link to its documentation. ## Tutorials - [Tutorials](https://docs.twinbasic.com/Tutorials/index.md): Tutorials are step-by-step guides focused on specific topics. - [Arrays](https://docs.twinbasic.com/Tutorials/Arrays.md): This tutorial explains arrays in twinBASIC: declaring and sizing them, finding their bounds and size, reaching their elements, returning them from functions, and low-level access to an array’s memory and to a string’s characters. - [CEF](https://docs.twinbasic.com/Tutorials/CEF/index.md): The CefBrowser control hosts a Chromium browser inside a twinBASIC form — navigate to web pages, run local web apps, exchange messages and method calls with JavaScript, and print pages to PDF. - [Calling the Windows API](https://docs.twinbasic.com/Tutorials/Windows-API.md): 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. - [CustomControls](https://docs.twinbasic.com/Tutorials/CustomControls/index.md): twinBASIC now offers experimental support for CustomControls. - [Forms basics](https://docs.twinbasic.com/Tutorials/Forms.md): This tutorial builds a small temperature-converter application. - [Hello World](https://docs.twinbasic.com/Tutorials/Hello-World.md): In this tutorial you will create a Standard EXE project, place a button on a form, and write one line of code that shows a message box when the button is clicked. - [WebView2](https://docs.twinbasic.com/Tutorials/WebView2/index.md): The WebView2 control hosts the Microsoft Edge browser engine inside a twinBASIC form — navigate to web pages, run local web apps, exchange messages and method calls with JavaScript, intercept HTTP traffic, and print pages to PDF. - [Writing unit tests with Assert](https://docs.twinbasic.com/Tutorials/Testing-with-Assert.md): 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. ## Features - [Features](https://docs.twinbasic.com/Features/index.md): This section documents all the features and enhancements that twinBASIC brings compared to VBx and earlier BASIC dialects. - [Attributes](https://docs.twinbasic.com/Features/Attributes-Intro.md): twinBASIC supports defining attributes directly in code to annotate modules, classes, types, procedures, and more. - [Language Syntax](https://docs.twinbasic.com/Features/Language/index.md): twinBASIC introduces numerous enhancements to VBx language syntax, including new data types, improved type systems, and modern programming constructs. - [Project Configuration](https://docs.twinbasic.com/Features/Project-Configuration/index.md): twinBASIC offers various project configuration options and new project types to suit different development needs. - [Standard Library](https://docs.twinbasic.com/Features/Standard-Library/index.md): twinBASIC enhances the standard library with Unicode support, new functions, and improved file I/O capabilities. - [GUI Components](https://docs.twinbasic.com/Features/GUI-Components/index.md): twinBASIC modernizes GUI components with enhanced forms, improved controls, and new control types. - [Package Management](https://docs.twinbasic.com/Features/Packages/index.md): In twinBASIC, a package is a collection of components that you can reference from another twinBASIC project. - [Advanced Features](https://docs.twinbasic.com/Features/Advanced/index.md): Advanced twinBASIC features for low-level programming and system integration. - [Compiler and IDE Features](https://docs.twinbasic.com/Features/Compiler-IDE/index.md): twinBASIC includes many compiler features and IDE enhancements to improve the development experience. - [64bit Compilation](https://docs.twinbasic.com/Features/64bit.md): twinBASIC can compile native 64bit executables in addition to 32bit. - [Fusion](https://docs.twinbasic.com/Features/Fusion.md): Fusion lets a 64-bit twinBASIC program host certain 32-bit ActiveX controls, through a helper program that runs them in a process of their own. ## LLVM - [LLVM](https://docs.twinbasic.com/LLVM/index.md): twinBASIC can compile a project with LLVM, an optimizing compiler back end built into the IDE, to make the program faster and smaller. - [Getting Started with LLVM](https://docs.twinbasic.com/LLVM/Getting-Started.md): Covers turning on LLVM compilation for a project or for a single procedure, the options that control it, and its current limitations. ## Reference Section - [Reference Section](https://docs.twinbasic.com/Reference.md): The reference is organized into three layers: the language constructs the compiler parses (keywords, statements, operators), the runtime members shipped in the packages (functions, properties, types, classes), and the packages themselves. - [Categories](https://docs.twinbasic.com/Reference/Categories.md): This chapter lists the global statements and procedures that form the core of the twinBASIC language. - [Statements](https://docs.twinbasic.com/Reference/Statements.md): These statements are built into the language itself. - [Procedures and Functions](https://docs.twinbasic.com/Reference/Procedures-and-Functions.md): Lists every procedure and function of the runtime library in alphabetical order, each with what it does. - [Operators](https://docs.twinbasic.com/Reference/Operators.md): Operators built into the twinBASIC language. - [Compiler Constants](https://docs.twinbasic.com/Reference/Compiler-Constants.md): The constants twinBASIC predefines for conditional compilation, and how to test them with #If. - [Attributes](https://docs.twinbasic.com/tB/Core/Attributes.md): An attribute, written in square brackets, gives the compiler an instruction or annotates a form, module, class, type, enumeration, declaration or procedure. - [Controls](https://docs.twinbasic.com/tB/Controls.md): The standard set of UI control classes that ship with twinBASIC lives in the VB built-in package — see VB Package for the package landing page. - [COM Interfaces](https://docs.twinbasic.com/Reference/COM-Interfaces/index.md): The standard COM interfaces that twinBASIC code implements or calls, described with what each method must do and what twinBASIC adds or requires. - [Enumerations](https://docs.twinbasic.com/Reference/Enumerations.md): An enumeration defines a named set of integer constants. - [Data Types](https://docs.twinbasic.com/Reference/Data-Types.md): twinBASIC supports fourteen intrinsic data types. - [Literal Keywords](https://docs.twinbasic.com/Reference/Literal-Keywords.md): Nothing, Null, Empty, True and False are keywords that stand for fixed values. - [twinBASIC Additions](https://docs.twinbasic.com/Reference/twinBASIC-Additions.md): twinBASIC extends the VBA language with new data types, language constructs, operators, runtime functions, and project-level capabilities. - [Run-time Errors](https://docs.twinbasic.com/Reference/Run-time-Errors.md): Every run-time error number that has a message of its own, with that message, and the reference pages that list each number among the errors their procedure raises. - [Glossary](https://docs.twinbasic.com/tB/Gloss.md): Defines the technical terms that the documentation uses. ## Packages - [Packages](https://docs.twinbasic.com/tB/Packages/index.md): A package groups related code — modules, classes, controls, and enumerations — under a single namespace, and is referenced from a project as a single dependency. - [Default Packages](https://docs.twinbasic.com/tB/Packages/Default/index.md): These packages are included in every twinBASIC project by default. - [Built-In Packages](https://docs.twinbasic.com/tB/Packages/Built-In/index.md): These packages are built into twinBASIC and are always available, even offline. - [Contributed Packages](https://docs.twinbasic.com/tB/Packages/Contributed/index.md): Community-authored packages published through TWINSERV, the twinBASIC package registry. - [Experimental Packages](https://docs.twinbasic.com/tB/Packages/Experimental/index.md): Community-authored packages from TWINSERV that are not yet ready for use in a program. ## IDE - [IDE](https://docs.twinbasic.com/tB/IDE.md): The twinBASIC IDE is one window that holds everything you need to write a program, run it, debug it and build it. - [Starting a project](https://docs.twinbasic.com/tB/IDE/Starting/index.md): This chapter follows the IDE from the moment it starts to a project that is open: what the first start asks, the dialog that makes or opens a project, every way of opening one, importing a VB6 project, and the sample projects that ship… - [Projects and files](https://docs.twinbasic.com/tB/IDE/Projects/index.md): A project is a set of files that the compiler holds in memory, and the IDE keeps a copy of the set and shows it in the PROJECT EXPLORER. - [Writing code](https://docs.twinbasic.com/tB/IDE/Code/index.md): The code editor and the panels you use beside it: tabs, editing commands, IntelliSense, navigation, searching, the list of problems and the Object Browser. - [Designing forms](https://docs.twinbasic.com/tB/IDE/Forms/index.md): A designer is the window where you build a form by drawing controls on it, and where you set the properties of the form and of each control. - [Designing reports](https://docs.twinbasic.com/tB/IDE/Reports/index.md): The report designer lays out a report in bands, one for each part of the page, and lets you place labels, shapes, lines, pictures and QR codes in them. - [Running and debugging](https://docs.twinbasic.com/tB/IDE/Debugging/index.md): The IDE runs your program inside the compiler, so you can stop it, look at its variables and step through its code without building an executable first. - [Building](https://docs.twinbasic.com/tB/IDE/Building/index.md): A build turns the project into a file: an executable, a DLL, an ActiveX control or a package. - [Customising the IDE](https://docs.twinbasic.com/tB/IDE/Customising/index.md): The IDE lets you change its fonts and behaviour, its colours, the arrangement of its panels, the keys that run its commands and the language of its menus. - [When something goes wrong](https://docs.twinbasic.com/tB/IDE/Troubleshooting/index.md): The IDE is a web page that runs inside a native window, and it does no compiling itself. - [IDE Reference](https://docs.twinbasic.com/tB/IDE/Reference.md): The parts of the IDE that are described one control at a time: the menus, the title bar, the toolbar, the status bar, the commands and their keyboard shortcuts, and the Webpage pane. - [Add Ins](https://docs.twinbasic.com/tB/IDE/AddIns/index.md): An addin is a Standard DLL that exports tbCreateCompilerAddin and returns an object implementing the AddIn interface. - [Project Settings](https://docs.twinbasic.com/tB/IDE/Project-Settings.md): The Project Settings dialog, Project → Project Settings…, holds the settings of the open project. ## Optional - [Challenges](https://docs.twinbasic.com/Challenges.md): The monthly twinBASIC challenges, which began in January 2026: a program to write each month, and a £100 account credit towards twinBASIC licences to win. - [Self-Contained Diagnostic Tool](https://docs.twinbasic.com/Challenges/1.md): Build a self-contained Windows diagnostic tool using twinBASIC. - [Create a Game](https://docs.twinbasic.com/Challenges/2.md): Build any game you like using twinBASIC. - [Create a Data Viewer](https://docs.twinbasic.com/Challenges/3.md): Build an application that reads data from a file or the system and presents it in a useful or interesting visual way. - [Videos](https://docs.twinbasic.com/Videos.md): Video recordings documenting the development and use of twinBASIC. - [Access DevCon Videos](https://docs.twinbasic.com/Videos/AccessDevCon.md): Recordings of the twinBASIC talks at Access DevCon, a conference for Microsoft Access developers, from 2021 to 2026. - [tB Videos](https://docs.twinbasic.com/Videos/tB.md): Videos that show twinBASIC: its introduction, setup guides, new compiler features, debugging, and previews of features in development. - [Documentation Development](https://docs.twinbasic.com/Documentation/Development/index.md): This section covers the twinBASIC documentation’s own tooling: the URL contract the compiler and IDE rely on, how to author a page in the house style, the build / preview / deploy workflow, every script and batch file in the repository… - [Permanent Links](https://docs.twinbasic.com/Documentation/Development/Permanent-Links.md): The stable, machine-accessible part of the documentation tree is rooted on the /tB/ prefix. - [Authoring Pages](https://docs.twinbasic.com/Documentation/Development/Authoring.md): The starting point for writing or editing a documentation page: frontmatter, headings, formatting, prose style, attribution and links. - [Building and Deployment](https://docs.twinbasic.com/Documentation/Development/Building.md): The day-to-day workflow for editing documentation: requirements, building, serving locally, link checking, Graphviz diagrams, screenshots, and the deployment to docs.twinbasic.com. - [Tools and Scripts](https://docs.twinbasic.com/Documentation/Development/Tools.md): Reference for every executable in the documentation repository. - [tbdocs Builder](https://docs.twinbasic.com/Documentation/Development/Builder.md): Technical documentation for the tbdocs static site generator at builder/. - [Updating a Contributed Package](https://docs.twinbasic.com/Documentation/Development/Contributed-Packages.md): The steps that bring a contributed package’s section up to a new version of the package, in the order they are run. - [Wisdom](https://docs.twinbasic.com/Documentation/Development/Wisdom.md): Three-phase tool that extracts technical knowledge from the twinBASIC Discord server and drafts documentation additions for human review. - [PDF Generation](https://docs.twinbasic.com/Documentation/Development/PDF-Generation.md): Internals of the two-stage PDF pipeline: tbdocs Phase 8 assembles a sparse _site-pdf/ source tree, then book/render-book.mjs renders it into _pdf/twinBASIC Book.pdf via headless Chromium + paged.js + pdf-lib. - [Library Patches](https://docs.twinbasic.com/Documentation/Development/Fixes.md): Two third-party libraries are modified in the tree. book/lib/paged.browser.js is a patched copy of paged.js v0.4.3 (MIT); the fast-*.mjs files there are shims applied to pdf-lib’s live exports before each PDF process phase. - [Build Info](https://docs.twinbasic.com/Documentation/Development/BuildInfo.md): Gantt chart of this build’s task timeline.