twinBASIC Update: January 27, 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
Dedicated Local App Folder for tB Addins and Themes
Beginning with BETA 667, addins, language packs, and themes can now be loaded from a dedicated twinBASIC
folder in your user profile's application data folder:
%APPDATA%\twinBASIC
The exact location will vary by computer and user. If you enter %APPDATA%\twinBASIC
in the address bar of Windows Explorer, it will expand to the actual location for your user profile. For example, on my home computer, the above path expands to:
C:\Users\Mike\AppData\Roaming\twinBASIC
Prior to this change, the above subfolders–addins
, locale
, and themes
–had to be in the same folder as the twinBASIC.exe
application file.
That required manually copying and pasting these user customizations whenever you installed a new version of twinBASIC. Which, with a release cadence like twinBASIC's, resulted in a lot of unnecessary copying and pasting.
Having a dedicated folder to keep these items will make it more practical to start managing custom addin and theme files for the twinBASIC IDE.
Discord Chat Summary
* Auto-generated via Claude-3.5-Sonnet-200k on poe.com
Here's the summary of the twinBASIC Discord general channel discussions from January 21-27, 2025:
Overview
This week's discussions centered around IDE interface improvements, bug fixes related to control behavior, and threading implementation details. Notable activity included fixes for Default/Cancel button functionality and UI element visibility in the dark theme. The community engaged in detailed technical discussions about COM threading models and their implementation in twinBASIC.
IDE Interface & Usability
- The IDE received updates to scrollbar visibility and panel icons, with WaynePhillipsEA implementing codicon-based icons and adding drop-shadow effects for better visibility in dark themes
- UI improvements included relocating the Settings access to a dedicated icon, though some users noted visibility concerns in dark theme
- Community feedback highlighted the need for potential high-contrast themes for accessibility (suggested by mansellan)
Bug Fixes & Control Behavior
- WaynePhillipsEA resolved a critical bug with Default/Cancel CommandButton behavior in BETA 671
- Fixed an issue where scrollbar position indicators were invisible when MiniMap was visible (resolved in build 668)
- Control array element unloading functionality was improved, with explicit support for
Unload myCtlArrayElement
syntax
Threading Implementation
- Detailed technical discussion about twinBASIC's threading model, with wqweto confirming STA (Single-Threaded Apartment) implementation
- Community members discussed COM marshalling approaches and VB6 threading compatibility
- Significant discussion around proper thread initialization and COM object handling across threads
Development Tools & Testing
- bclothier highlighted the need for regression testing capabilities
- Community shared experiences with intellisense and syntax highlighting behaviors
- Discussion of potential breaking changes in builds after BETA 624 due to internal architecture changes
Conclusion
The week showed significant progress in stabilizing the IDE interface and core control behaviors. The detailed technical discussions around threading models and COM implementation demonstrate the community's focus on enterprise-grade functionality. The development team's quick response to UI-related feedback highlights their commitment to user experience, while maintaining compatibility with existing VB6/COM paradigms.
Around the Web
Rubberduck 3: Re-scoped
It seems twinBASIC's continuing progress has led Mathieu Guindon–lead developer of the Rubberduck project–to rethink the direction of that project's next big release:
What about v3?
If things had gone smoothly, you would know by now. They obviously haven’t, and not much has moved on that front since last May or so. I’m not abandoning the project, but building an entire editor client and a language server is honestly much more than I can chew at the moment, for multiple reasons… twinBASIC is coming, and while a commercial offering, it’s a VB6/VBA language server and compiler, and it reckons the whole editor part is already a solved problem. Rubberduck 3.0 was going to reinvent that wheel, which would have been a huge distraction.
So RD3 is going to be re-scoped a bit: the planned VBIDE integration / add-in part remains of course, but instead of making an entire editor from scratch, we’ll integrate into an existing, modern one that’s already an extensible LSP (Language Server Protocol) client, much like Visual Studio Code (but no, it’s not going to be VS Code). This instantly knocks off (well, removes outright) a gigantic, milestone.
The part of the article that really caught my attention, though, was this little nugget (emphasis mine):
...the technology used for building Rubberduck has evolved a lot in the last decade, with much of it either deprecated, or on the brink of falling out of official long-term support from Microsoft...
I bet VBA will outlive .NET Framework 4.8.1 LTS, which is non-ironically very funny to me...
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.5-Sonnet, sorted in order of its opinion of "most impactful changes."
-
IDE Enhancement: Added support for custom IDE addins, themes, and language packs through user-specific %APPDATA%\twinBASIC folders, expanding customization options
-
Form Control Improvements: Enhanced form control behaviors, including better handling of AutoRedraw, WM_FONT messages, and control array unloading operations to achieve closer VB6/VBA compatibility
-
Command Button Refinements: Fixed multiple CommandButton-related issues, including Default/Cancel button behaviors and interaction with non-native controls, improving form functionality
Note: This update primarily focused on bug fixes and compatibility improvements, with the IDE addon support being the major new feature addition.
WARNING: The following issues are present in BETA builds 623 - 671 (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 until the BETA 623+ version stabilizes or if any of the KNOWN ISSUES below affect your project.]
- KNOWN ISSUE: UserControls from the ACTIVE project will not appear correctly in the form designer in this release (they are purposely disabled until next release). Packaged controls, such as VBCCR will work.
- 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)
- 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 667
- added: support for loading IDE addins, themes and language packs from %APPDATA%\twinBASIC folders (auto-created) [ fafalone, discord ]
- fixed: tweaked the intellisense SPACE bar handling further to prevent invalid removal of spaces when typing quickly
BETA 668
- fixed: AutoRedraw=True behaviours around reuse of cached bitmaps when width/height is changed [ XYplorer, private ]
- fixed: controls added via Controls.Add() could spill over into the next load of the same form [ XYplorer, private ]
- fixed: IDE monaco scrollbar was missing when CodeMinimapVisible theme property is on [ fafalone, discord ]
BETA 669
- fixed: (regression in BETA 667) intellisense broken when the selected intellisense entry is changed with the arrow keys before acceptance
- fixed: WM_GETFONT/WM_SETFONT handling for Forms/PictureBox/UCs [ XYplorer, private ]
BETA 670
- fixed: position at which Form.Initialize event gets fired has been further refined to match VBx [ XYplorer, private ]
- fixed: memory leak (UI objects) in form unloading routines involving menus [ XYplorer, private ]
- fixed: Default/Cancel CommandButtons would not be triggered if the focused control was not a tB native control [ XYplorer, private ]
- fixed:
Unload myCtlArrayElement
is now supported, where the element index is not passed in the statement but instead implied by the instance [ XYplorer, private ]
BETA 671
- fixed: some issues with CommandButton.Default property not working as expected [ fafalone, discord ]