twinBASIC Update: May 5, 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:
- Custom twinBASIC IDE Installation Guide
- twinBASIC Discord Server (chat about the project)
- twinBASIC Wiki (list of new features not in VBx)
- GitHub Issue Tracker (report bugs)
- twinBASIC/VBx LinkedIn Group
Highlights
New Find/Replace Dialog
In BETA 752, Wayne introduced a built-in Find/Replace dialog for the twinBASIC IDE. This initial version of the dialog was a "like-for-like copy" of the original VB6 Find/Replace dialog, but Wayne noted, "We can refine and improve it later."
It didn't take long for the refinements and improvements to appear.
In BETA 755, the Find/Replace dialog got supercharged with support for regular expression searches:
For additional details and discussion, check out the related GitHub issue:
twinBASIC Syntax Highlighting in Notepad++
Thanks to the efforts of community member sokinkeso, there is now an official twinBASIC User Defined Language for Notepad++.
Here's the announcement from the show-and-tell channel:
Great news for twinBASIC developers and enthusiasts —a User Defined Language (UDL) has been created for Notepad++, one of the most widely used text/code editors!
With this UDL, syntax highlighting is now available for twinBASIC, making code easier to read and work with. Plus, it includes all new twinBASIC statements, functions, keywords, and operators, ensuring a more streamlined coding experience.
- Improved readability with syntax highlighting
- Support for all twinBASIC’s latest features
- Making use of the familiar and powerful Notepad++ editor
If you use Notepad++ for coding, this is a great way to enhance your twinBASIC workflow! Give it a try and enjoy a smoother development experience.
Sokinkeso provided the following instructions for installing the UDL (it's not one of the available built-in language formats...yet):
How to Add the twinBASIC UDL to Notepad++
- Download the UDL File
Visit the Notepad++ User Defined Languages repository: https://github.com/notepad-plus-plus/userDefinedLanguages/tree/master/UDLs
Find the twinBASIC UDL file and download it.
[Editor's Note: Or, use this direct link: twinBASIC_by_sokinkeso.xml ]
- Import the UDL File
Go to "Language" → "User Defined Language" → "Define your language..."
Click "Import", then select the downloaded twinBASIC UDL file.
- Apply the Language to Your Code
Once imported, you can select twinBASIC as your preferred language in Notepad++.
Go to "Language", then scroll to twinBASIC and select it.
- Enjoy Syntax Highlighting!
Discord Chat Summary
* Auto-generated via Claude-3.7-Sonnet
Overview
This week in the twinBASIC community featured significant IDE improvements with the introduction of a new Find/Replace dialog. Discussions centered around COM interface implementation details, memory management functions, and cross-platform development considerations. The community welcomed several new members exploring twinBASIC as a migration path from VB6 projects.
IDE Enhancements
- Wayne Phillips shared a preview of the upcoming Find/Replace dialog, which was quickly implemented and released in BETA 752 the same day, demonstrating the team's rapid development cycle
- Community members provided feedback on desired features for the dialog, including up/down arrow navigation for search history and the familiar VB6 "search wrapped" notification
- The new dialog maintains a consistent look and feel with the VB6 experience while laying groundwork for future improvements
COM and Interface Implementation
- Wayne clarified that QueryInterface isn't necessary when working with extended interfaces, providing a detailed code example to demonstrate how interface inheritance works in twinBASIC
- A bug was identified where overloaded methods with the same parameter types but different return types fail to disambiguate in class modules (while working correctly in standard modules)
- Discussion around non-COM interfaces that don't inherit from IUnknown revealed implementation challenges for certain DirectX components
Memory Management
- An issue with the
vbaRefVarAry
internal function was identified and quickly fixed in BETA 753 - The problem was traced to an incorrect
PreserveSig(False)
attribute on the function declaration - Wayne explained that most VBA memory functions should be declared with
ByRef As Any
parameters for maximum flexibility, though changing existing declarations would break compatibility
Cross-Platform Development
- New community members explored migration options for DirectX and networking components
- Discussion around Winsock implementation revealed that while a native implementation is planned post-v1.0, several API-based alternatives exist for Windows development
- Cross-platform graphics options including OpenGL and SFML were mentioned as potential alternatives to DirectX for projects targeting multiple platforms
Conclusion
This week demonstrated twinBASIC's continued evolution with both visible UI improvements and under-the-hood fixes. The rapid implementation of the Find/Replace dialog shows the development team's responsiveness to community needs. Meanwhile, technical discussions around interfaces and memory management highlight the project's commitment to both VB6 compatibility and modern programming practices. As new members join the community, interest in cross-platform capabilities continues to grow.
Around the Web
Picture Converter & Cropper
VanGoghGaming posted the following in the show-and-tell channel:
Simple Picture Converter & Cropper with WinRT BitmapDecoder & BitmapEncoder Classes
This project allows you to convert various picture formats, optionally apply some transforms (Scale, Flip, Rotation, Crop) and save the result as another format.
Many picture formats are supported as seen in this screenshot. Transparency is preserved for PNGs, GIFs and other formats supporting it.
Currently there is a tB bug concerning the AutoRedraw property that interferes with drawing the selection rectangle for the cropping area but it's just a visual bug, the functionality is not affected.
The sample project is available for download in Discord here.
twinBASIC Reddit Thread
Why is compiling on TwinBASIC (a VB6 alternative) instant while on .NET it takes longer?
by u/GeoworkerEnsembler in dotnet
New Controls Added to New Features Page in Wiki
The QR Code and Multiframe controls have been added to the "New Features" page in the official twinBASIC wiki:
Changelog
Here are the updates from the past week. You can also find this information by visiting the GitHub twinBASIC Releases page.
AI-Generated Changelog Summary
* Auto-generated via Claude-3.7-Sonnet, sorted in order of its opinion of "most impactful changes."
-
Added: New Find/Replace Panel - A new search functionality has been implemented to better match VB6/VBA expectations. This panel can be used either floating or docked, currently with basic functionality that will be expanded in future releases to include project-scope searching and more advanced features.
-
Added: Enhanced Search Capabilities - The Find/Replace dialog now supports Pattern Matching and Regular Expression matching, providing more powerful search options.
-
Fixed: Function Declaration Issues - Corrected issues with internal VBA function declarations in [_HiddenModule] that had incorrect attribute settings, resolving compatibility problems.
-
Fixed: Regression in PreserveSig Attributes - Addressed a regression in BETA 752 that affected wrapper functions in _HiddenModule, which was causing access violations in user controls.
WARNING: The following issues are present in BETA builds 623 - 755 (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 752
- added: experimental FIND / REPLACE panel (not fully implemented yet) [ https://github.com/twinbasic/twinbasic/issues/1896 ]
BETA 753
- fixed: declerations of the internal vba* functions in [_HiddenModule] incorrectly had
[PreserveSig(False)]
attribute set on them [ VanGoghGaming, discord ]
BETA 754
- fixed: (regression in BETA 752) reverted incorrect changes to
[PreserveSig(False)]
attribute set on some wrappers in _HiddenModule [ https://github.com/twinbasic/twinbasic/issues/2109 ]
BETA 755
- added: initial support for "Pattern Matching" in Find/Replace dialog
- added: initial support for "Match Regular Expressions" in Find/Replace dialog