twinBASIC Update: March 11, 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

Long-Standing Regressions Fixed

The following issues which have been present since the major IDE rewrite released in BETA 623 have been resolved as of BETA 708:

  • KNOWN ISSUE: Menus currently not appearing in MDI Forms (broken in this build)
  • KNOWN ISSUE: 'Scale*' properties are often not settable in the IDE property sheet (broken in this build)
  • KNOWN ISSUE: Setting Width/Height via the property sheet often does not work correctly (broken in this build)

Discord Chat Summary

* Auto-generated via Claude-3.5-Sonnet-200k on poe.com

Overview

This week saw significant community engagement around WebView2 integration, with multiple developers exploring wrapper implementations and sharing experiences. Community members also reported positive progress with twinBASIC compatibility for legacy applications, while discussions around deployment challenges and third-party component integration highlighted ongoing areas for improvement.

WebView2 Integration

  • A detailed exploration of WebView2 control implementation dominated discussions, with @fafalone creating and sharing an open-source WebView2 control wrapper for VB6 and VBA64 using twinBASIC.
  • Wayne Phillips confirmed that twinBASIC links in the static library version of WebView2Loader rather than requiring the DLL, simplifying deployment.
  • Several community members reported IDE stability issues when working with WebView2 controls in UserControls, though the compiled applications functioned correctly.

Community Resources & Tutorials

  • @nolongerset shared a comprehensive collection of twinBASIC tutorials covering COM add-ins, ActiveX controls, VBE tool windows, and standard DLLs.
  • @fafalone demonstrated advanced API hooking techniques in x64 with twinBASIC, sharing code examples for redirecting Windows API calls.
  • The community discussed alternatives to commercial components like Chilkat, with members sharing free options for OAuth implementation.

Project Success Stories

  • @calumsult reported that version 708 was the first version where their legacy application worked without code changes, marking a significant milestone in compatibility.
  • @twixydon announced the first twinBASIC-compiled version of XYplorer had been released to beta testers with positive reception.
  • Several developers shared success stories of migrating VB6 applications to twinBASIC with minimal effort.

Deployment Challenges

  • @dinyaz reported mixed experiences when deploying a twinBASIC application that uses third-party ActiveX controls to machines without development environments.
  • Wayne Phillips identified a likely issue with license embedding for ActiveX controls, noting that multiple similar reports had been received.
  • @fafalone explained how Windows' "legacy installer" detection mechanism can cause deployment issues, suggesting manifest modifications as a potential solution.

Conclusion

This week demonstrated twinBASIC's growing maturity as developers successfully migrated complex applications and created sophisticated components like WebView2 wrappers. While deployment challenges with third-party components remain an area for improvement, the overall trajectory shows steady progress toward production readiness. The community continues to actively share resources and troubleshooting advice, helping to build a robust ecosystem around the language.

Around the Web

twinBASIC-Compiled Version of XYplorer Hits Beta

Don from XYplorer posted the following in Discord:

The first ever TB-compiled XYplorer has been released to the XY beta club, with cheerful reactions:
+++ BREAKING NEWS: XYplorer goes twinBASIC +++ - Page 6 - XYplorer Beta Club

WinDevLib Bug Fix Update

fafalone posted the following in Discord regarding his most excellent Windows Development Library twinPACK (twinBASIC Package):

BUG WARNING
So apparently about 66% of the time it just slipped my mind that you need to account for the overall size and alignment of union member structs.
If you use anything with a byte array standing in for a union, check the definition. There's likely hundreds of mistakes in this situation. I've corrected the first couple dozen (unreleased) but it will take days to get through everything.

One day later, fafalone posted this update:

Project Update: v8.8.504: Ok I think I've fixed all errors of this type; there were 100+ so you'll definitely want to update.

If you've never updated a package before, see this comment: https://github.com/fafalone/WinDevLib/issues/9#issuecomment-2676409041
WinDevLib: A Better Way to Call Windows API Functions in twinBASIC
Stop struggling to declare your Windows API calls in twinBASIC. Use the Windows Development Library twinPACK and let fafalone do all the hard work for you.
GitHub - fafalone/WinDevLib: Windows Development Library for twinBASIC
Windows Development Library for twinBASIC. Contribute to fafalone/WinDevLib 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-3.5-Sonnet, sorted in order of its opinion of "most impactful changes."

  • Fixed: MDI Menu Support - MDI menus are now working properly again, improving functionality for multiple document interface applications

  • Improved: Form Designer Reliability - Several form designer issues have been fixed including:

    • Width/Height properties can now be properly set in the property sheet
    • Scale properties are now correctly settable
    • '(add)' entry for lists works more reliably
  • Fixed: UserControl Implementation - Resolved a circular reference issue in UserControls that was preventing proper cleanup during ActiveX shutdown

  • Fixed: DLL/OCX Building - Corrected a regression (since BETA 674) that could cause DLL and OCX builds to fail when the output file already existed due to a native debugger handle leak


WARNING: The following issues are present in BETA builds 623 - 710 (the latest build as of publication):

  • IMPORTANT: This is an interim/experimental release. It includes significant changes, so some instability is to be expected. [Editor's Note: Rolling back to BETA 622 may be necessary if any of the KNOWN ISSUES below affect your project.]
  • KNOWN ISSUE: Controls are not being destroyed properly by the form designer, causing big memory leaks (broken in this build)
  • there are known memory leaks in these versions, so memory usage will be higher than at the Version 1.0 release

BETA 708

  • improved: '(add)' entry in the form designer for lists is now works more reliably [ sokinkeso, discord ]
  • fixed: MDI menus, now working again
  • fixed: setting Width/Height properties from the form designer property sheet, now working again
  • fixed: Scale* properties often not settable in the IDE form designer property sheet, now working again

BETA 709

  • fixed: circular reference in UserControl implementation, leading to main UC outer class not being freed during AX shutdown [ Tecman, discord ]
  • fixed: (regression since BETA 692) OLE_COLOR issue in IDispatch::Invoke implementation [ Tecman, discord ]

BETA 710

  • fixed: (regression since BETA 674) building DLLs/OCXs might fail if the output file already exists due to a native debugger handle leak
  • fixed: CodeJock controls support for Move method [ kimpos, private ]