twinBASIC Update: December 8, 2025

Highlights include major save stability improvements, a HandleTool utility for troubleshooting file handles, and demo code to show the 'Select Computer' dialog.

twinBASIC Update: December 8, 2025

On April 23, 2021, I helped Wayne Phillips introduce the world to twinBASIC at the Access DevCon Vienna conference. I boldly predicted that twinBASIC (along with the Monaco editor) would replace VBA and its outdated development environment by 2025. With that goal in mind, this weekly update is my attempt to keep the project fresh in the minds of the VBA development community.

Every Sunday Monday week, I will be providing updates on the status of the project, linking to new articles discussing twinBASIC, and generally trying to increase engagement with the project. If you come across items that should be included here, please leave a comment below.

Here are some links to get involved with the project:


Highlights

Project Saving Mechanism Completely Overhauled

* Auto-generated via Claude-Opus-4.5

BETA 909 introduced a complete overhaul of the project saving mechanism, eliminating the frustrating "IDE Save Project Failed!" error that has plagued users. This represents one of the most significant stability improvements to the IDE in recent releases.

Wayne acknowledged the scope of this change with a cautionary note in the release: "Those of a nervous disposition might prefer to skip this release until the community have verified the new project saving mechanism is stable."

The community response has been overwhelmingly positive. After several days of testing across BETA 909 through 916, users reported dramatic improvements. One community member summarized the consensus: "The IDE is clearly more stable; 'could not save' complaints don't happen anymore or very rarely." Another noted that the persistent "no changes detected" issue from previous versions no longer occurs in BETA 915+.

The overhaul required several follow-up refinements across subsequent releases. BETA 910 through 913 addressed regression issues including spurious "validation failed for open document" errors and an IDE freeze that could occur when removing referenced packages. BETA 915 added GetLastError reporting to failure dialogs for improved diagnostics, and BETA 916 resolved a save-reload bug that could cause package reference additions to fail.

One minor edge case was identified: the auto-increment version number doesn't persist when compiling and then closing the project without explicitly saving first. Wayne confirmed this is on his list for investigation.

For users who experienced repeated save failures in earlier versions, this overhaul should provide welcome relief as the project approaches its v1 release milestone.

Discord Chat Summary

* Auto-generated via Claude-Sonnet-4.5

Overview

This week saw significant progress on IDE stability with major improvements to the project saving mechanism, alongside continued community exploration of advanced twinBASIC features. The Black Friday licensing period concluded with strong support from the community, while Wayne confirmed ongoing commitment to a free Community Edition. Technical discussions ranged from assembly-level programming to WinRT integration, highlighting the growing sophistication of twinBASIC development.

IDE Stability & Saving Improvements

  • Major saving mechanism overhaul in BETA 909+ with Wayne warning "those of a nervous disposition might prefer to skip this release until the community have verified the new project saving mechanism is stable"
  • Community feedback confirmed significant improvements: "the IDE is clearly more stable; 'could not save' complaints don't happen anymore or very rarely"
  • Fixed critical bug where forms with controls named 'Filter' caused designer issues - traced to JavaScript array vs object confusion (= [] instead of = {})
  • Auto-increment version number not persisting when closing without saving identified as remaining issue
  • Added GetLastError reporting to save failure dialogs for better diagnostics

Advanced Language Features

  • ArrayBoundsCheck(False) with C-style arrays gaining traction - fafalone actively refactoring WinDevLib to leverage performance benefits
  • VanGoghGaming discovered elegant workaround for logical right shift using IntRsh = Value >> Shift And Not (-1 << (16 - Shift))
  • Wayne provided inline assembly alternatives for bit shifting operations using Emit, compatible with both x86 and x64
  • Community discussion on unsigned types as proper solution for logical shifts - expected to enable >>> operator naturally
  • ByVal UDT parameters dramatically simplifying WinRT interface definitions compared to VB6's complex x86 workarounds

Licensing & Business Model

  • Black Friday deals concluded December 5th with strong community support
  • Wayne confirmed free Community Edition will always exist including for v2, with commercial use permitted
  • Ultimate edition clarification: includes 1-day support (vs 2-day), v2 entitlement adding 12-18 months of updates
  • Community discussion on pricing tiers - Wayne acknowledged perspective on beta pricing while emphasizing v2 value proposition
  • Ko-fi donations remain available for those wanting to support without purchasing licenses

Assembly Programming & Low-Level Features

  • xelniya demonstrated sophisticated assembly implementations including logical right shift and CopyMemory functions using Emit
  • Naked functions confirmed working in modules but not forms (due to hidden "this" parameter and HRESULT return)
  • Discussion of prologue/epilogue calling conventions and x86 vs x64 differences
  • Wayne suggested ByRef Any support for Naked functions to match Declare statement capabilities
  • Community enthusiasm for low-level programming capabilities contrasting with business app development

WinRT & COM Integration

  • VanGoghGaming discovered IInspectable implementation quirks - restricted interfaces crash when called, requiring unrestricted variants
  • twinBASIC handles IInspectable implementation better than VB6 by default (no manual implementation needed)
  • For Each enumeration works with non-IDispatch types in twinBASIC unlike VB6
  • Order of Implements statements matters in tB but not VB6 when dealing with restricted/unrestricted interface pairs
  • ByVal UDT parameters eliminating need for complex padding workarounds in x86 WinRT code

Bug Fixes & Issues

  • Package reference addition temporarily broken in BETA 915, fixed in 916
  • Find/Replace dialog scope switching causing persistent IDE internal error
  • x86 crashes with ByVal UDT parameters containing 64-bit types (LongLong, Double, Currency) in UDT methods
  • Diagnostics sometimes requiring manual refresh to activate
  • Reference dialog rename widget positioning issues at non-100% DPI settings

Conclusion

The week marked a turning point in IDE stability with the new saving mechanism showing strong early results, though Wayne continues monitoring for edge cases. The community's exploration of assembly-level programming and WinRT integration demonstrates twinBASIC's growing capabilities beyond traditional VB6 compatibility. With Black Friday concluded and strong community support secured, focus shifts toward the February v1 release with CLI compiler support confirmed for "sometime between now and then." The balance between maintaining VB6 compatibility while enabling modern features like ByVal UDTs continues to be a defining characteristic of the project's evolution.

Around the Web

HandleTool - List Files and other handle types, find process(es) using file

Posted by fafalone in show-and-tell:

This started as a quick routine to test the [ArrayBoundsCheck(False)] method of using variable C-style arrays that I've been adapting WinDevLib to, and I, well, got a little carried away and made this entire small utility around the routine to list handles.

In additional to listing file handles and other handle types, you can choose a specific file, and this utility can list all processes with open handles to it, if you're wondering just who is responsible for a 'file in use' error.

Requires WinDevLib v9.2.626 (released same day as this project) or newer; it's set up as a linked package so you might need to refresh it even if you have it.
GitHub - fafalone/HandleTool: List Files and other handles, find process using file
List Files and other handles, find process using file - fafalone/HandleTool

More screenshots:

Displaying the 'Select Computer' Dialog

Also posted by fafalone in show-and-tell:

Had always wondered about this dialog, came across some code today and it is indeed a standard system dialog any app can use, then checked and there's no example anywhere I could find of using it in VBx/tB, so here's a small little demo showing basic usage.

Requires an updated WinDevLib, v9.2.627+, as versions before today had a bug that prevented using this project.

(Uses COM interfaces not available in oleexp.tlb, so VB6 people can just join us in the future 😆)
GitHub - fafalone/PickComputerDialog: Display the ‘Select Computer’ dialog
Display the ‘Select Computer’ dialog. Contribute to fafalone/PickComputerDialog development by creating an account on GitHub.

Changelog

Here are the updates from the past week. You can also find this information by visiting the GitHub twinBASIC Releases page.

Releases · WaynePhillipsEA/twinbasic
Contribute to WaynePhillipsEA/twinbasic development by creating an account on GitHub.

AI-Generated Changelog Summary

* Auto-generated via Claude-Sonnet-4.5, sorted in order of its opinion of "most impactful changes."

  • Personal Licensing Support Added: BETA 909 introduces support for PERSONAL twinBASIC licenses, expanding accessibility for individual developers.

  • Project Saving System Overhauled: Complete redesign of the project saving mechanism in BETA 909 to eliminate persistent "IDE Save Project Failed!" errors. Further refinements made in BETA 915 with improved error reporting.

  • Compiler Optimization Improvements: Unused global and static module variables are now properly stripped from compiled executables (BETA 917), and minor code generation tweaks reduce compiled binary sizes by approximately 1%.

  • Enhanced IDE Usability: Multiple improvements including CTRL+SPACE intellisense now auto-accepting single matches to match VB6 behavior, and new CTRL+T shortcut for quick access to Project References dialog.

  • Stability Fixes: Resolved multiple regressions introduced in BETA 896, including duplicate definition detection, compiler process stability improvements, and various document validation errors that appeared in BETA 909 and were progressively addressed through BETA 913.

  • Array Bounds Checking Fixes: Corrected issues where the [ArrayBoundsChecks(False)] attribute was ineffective in certain scenarios and could cause crashes on Win64 builds with negative array lower bounds.


WARNING: The following issues are present in each of the releases below:

  • IMPORTANT: This is an interim/experimental release. It includes significant changes, so some instability is to be expected.
  • NOTE: CustomControls are currently broken in BETA versions 896+ (e.g. Samples 6 and 8)
  • NOTE: Some regressions are expected due to the significant architectural changes introduced in BETA 896

BETA 909

  • fixed: Undo editing bug in the code editor, due to retaining stale auto-correct information [ sokinkeso, discord ]
  • fixed: (regression since BETA 896) duplicate definitions of classes, interfaces and modules were not being reported in the IDE [ VanGoghGaming, discord ]
  • fixed: Form with a control named 'Filter' causes issues with the form designer [ Dan, private ]
  • improved: For Each vItem In Nothing/Null/Empty (literals) would not throw a compile error [ VanGoghGaming, discord ]
  • improved: disallow leading dots in filesystem filenames to prevent files from being hidden accidentally [ FullValueRider, discord ]
  • fixed: trying to define a generic procedure inside a UDT caused compiler to crash -> now compile error [ VanGoghGaming, discord ]
  • improved: 'Enter Licence Key' IDE dialog is now accessible even when a project is not loaded [ Tecman, discord ]
  • fixed: using UserControl.ContainerHwnd property could lead to compile errors in latest builds [ AlienSoft, discord ]
  • added: support for PERSONAL twinBASIC licences
  • fixed: deletion of a document associated with a non-active tab would cause the editor pane to go blank
  • improved: some compiler process stability improvements
  • fixed: project saving has been completely overhauled to eliminate the 'IDE Save Project Failed!' error
  • NOTE: Those of a nervous disposition might prefer to skip this release until the community have verified the new project saving mechanism is stable

BETA 910

  • fixed: (regression in BETA 909) spurious "validation failed for open document" errors in the DEBUG CONSOLE [ birnaofthenorth, discord ]
  • fixed: IDE could be frozen if >2 overlapping modal dialogs were invoked at the same time [ birnaofthenorth, discord ]
  • fixed: switching to 'Project' scope in the IDE Find & Replace dialog would cause an IDE error to be reported in the DEBUG CONSOLE [ VanGoghGaming, discord ]

BETA 911

  • fixed: (regression since BETA 909) spurious "validation failed for open document" errors in the DEBUG CONSOLE [ birnaofthenorth, discord ]

BETA 912

  • fixed: (regression since BETA 909) spurious "validation failed for open document" errors in the DEBUG CONSOLE [ birnaofthenorth, discord ]

BETA 913

  • fixed: (regression since BETA 909) removing a referenced package could lead to freeze in the IDE [ Don, discord ]

BETA 914

  • fixed: WDL based WebView2 control couldn't be used in compiled executables due to compiler excluding parts of WebView2 from builds when original WV2 package is not referenced [ fafalone, discord ]
  • fixed: bad/corrupt file in %appdata%\twinBASIC\Packages folder will no longer cause IDE startup failure
  • fixed: hovering over a string whilst debugging would not show multiple spaces in the string [ Don, discord ]
  • improved: CTRL+SPACE for intellisense will now auto-accept the first entry if only 1 match is found, to match VBx [ wqweto, discord ]
  • fixed: the attribute [ArrayBoundsChecks(False)] was ineffective for array accesses where references were taken to an element
  • fixed: Clipboard.GetFormat() implementation was incorrectly sign-extending the passed in format when passing through to IsClipboardFormatAvailable API, leading to incorrect results [ Don, discord ]

BETA 915

  • improved: further tweaks to the new save-project mechanism, and now reports GetLastErr result in the IDE upon failure [ Don, discord ]

BETA 916

  • fixed: adding a package reference could fail in latest releases, due to save-reload bug [ GCUser99, discord ]
  • fixed: position of the library symbol editor text box when the project references dialog is scrolled [ wqweto, discord ]
  • added: shortcut CTRL+T to launch the Project References dialog [ wqweto, discord ]

BETA 917

  • fixed: unused global variables (inc. static module variables) are now stripped from built executables [ Don, discord ]
  • improved: minor tweak to codegen to reduce compiled sizes by approx 1%, YMMV
  • fixed: using [ArrayBoundsChecks(False)] on Win64 builds could crash if the lower bound of the array is negative [ Don, private ]

All original code samples by Mike Wolfe are licensed under CC BY 4.0