twinBASIC Update: March 19, 2025
Highlights include inline variable declaration in For...In and For...Each loops and a statement from Wayne on balancing VB6 back-compatibility and new features.

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
For Loop Inline Variable Declaration Added
As of BETA 712, twinBASIC supports inline variable declarations within For loops.
This new feature allows developers to declare loop counter variables directly in the loop statement itself, using the syntax For xyz As DataType = startValue To endValue
for standard loops and For Each x As DataType In collection
for enumeration loops. Previously, developers had to declare these variables separately before the loop began. This approach improves code organization by keeping related elements together and reduces the number of separate declaration statements needed. The addition brings twinBASIC's syntax closer to modern programming languages while maintaining compatibility with traditional VB coding patterns.
The feature maintains full compatibility with existing code while offering a more modern alternative for new development.
*Summary generated by Claude-3.7-Sonnet
Discord Chat Summary
* Auto-generated via Claude-3.7-Sonnet on poe.com
Overview
This week saw continued progress on twinBASIC with several notable feature additions and bug fixes. The community actively discussed VBA to twinBASIC migration challenges, driver development capabilities, and the project's roadmap priorities. Wayne Phillips provided important context on the balance between backward compatibility and new feature development, while community members shared practical solutions for common migration issues.
Bug Fixes & Technical Support
- The twinBASIC website and package server experienced brief downtime on March 12th and 13th, but Wayne quickly restored service.
- A new user struggling with VBA to twinBASIC migration received comprehensive help with ListBox controls and folder picker implementations, highlighting the differences between VBA's MSForms controls and twinBASIC's VB6-based controls.
- Community members helped troubleshoot issues with ActiveX DLLs, with Wayne encouraging users to report compatibility problems in the #bugs channel for proper tracking.
- Several users received assistance with project conversion workflows, particularly around managing exported files for version control.
Feature Development
- Beta 711 introduced inline variable declarations in
For
loops using the syntaxFor i As Long = ...
, a feature that was well-received by the community. - Wayne quickly followed up in Beta 712 by adding support for inline variable declarations in
For Each
loops with the syntaxFor Each foo As bar In ...
after a community request. - The Windows Development Library (WinDevLib) continues to be a valuable resource for twinBASIC developers, providing easy access to Windows API functions without manual declarations.
- A community member demonstrated using twinBASIC's driver development capabilities to create filter drivers, showcasing the language's ability to handle low-level system programming.
Project Direction & Roadmap
- Wayne provided an important statement on project priorities, emphasizing that backward compatibility remains the top focus while carefully introducing features that enhance the development experience.
- He clarified that most development time is dedicated to fixes, with new features only being implemented if they can be done quickly (usually within 30 minutes).
- The community discussed the comparison between twinBASIC and competing projects, with Wayne noting that twinBASIC's progress far exceeds what other VB6-compatible alternatives have achieved.
- Several users expressed excitement about post-1.0 features like native multithreading syntax and cross-platform compilation.
Community Insights
- A discussion about UserControls revealed interesting development philosophies, with one developer explaining their preference for avoiding UserControls to maintain complete control over their application's behavior.
- The community demonstrated strong support for twinBASIC's approach to balancing compatibility with modern features, with many expressing appreciation for Wayne's commitment to the project.
- A user noted the dramatic performance improvement in compilation speed, mentioning that twinBASIC compiles their code in 2 seconds compared to VB6's 2 minutes.
- The "twinBASIC for Applications" proof-of-concept video (showing tB as a VBA replacement) continues to generate interest, with community members promoting its advantages over alternatives.
Conclusion
This week demonstrated twinBASIC's continued evolution as both a VB6 replacement and a modern development platform. The balance between maintaining backward compatibility and introducing new features remains a key focus, with Wayne clearly articulating the project's priorities. Community engagement remains strong, with experienced members actively helping newcomers navigate migration challenges. As the project approaches version 1.0, the excitement for both current capabilities and future enhancements continues to grow.
Around the Web
Message from Wayne re: VB6 compatibility vs. New Features
Over on Discord, Don from XYplorer gently nudged Wayne to cross the finish line on VB6 backward compatibility:
New features are all well and good, but fixing bugs and pursuing the original goal (100% backwards compatibility) should be the priority. I don't mind if it's only 99%, but it would be nice if it happened before AI takes over the whole business.
Wayne responded with a general take on striking a balance between achieving 100% backward compatibility with VB6 and also introducing new features into the language:
Backwards compatibility remains a top priority, and I completely understand the desire to see it reach as close to 100% as soon as possible. That said, twinBASIC isn’t just about being a copycat- we’re also here to take VB6 to the next level. This means striking a balance between fixing compatibility issues and carefully introducing features that enhance the experience for modern development.
In reality, the vast majority of development time is dedicated to fixes, which you can clearly see from the release notes. At this point, new features are only considered if they can be implemented quickly (usually within 30 minutes); anything bigger is not on the radar.
Just a note about your personally reported issues - I always allocate a dedicated block of time to tackle them efficiently rather than addressing them in a piecemeal fashion. Your next batch is scheduled for early next week, so you should see XY progress soon!
I know it can be frustrating when things don’t move as fast as you’d like, and I do my best to balance everything. Some days, I only get a couple of hours to work on tB, while other days I can put in 12. Regardless, I can assure you that every effort is being made to push things forward as effectively and efficiently as possible.
Also, keep in mind that there’s a good reason why no other fully VB6-compatible language exists - the complexity of managing a project of this scale is immense. Yet, look at how far we’ve come already - far beyond what any competitor has achieved before. Hold tight, and all will come good.
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."
-
Fixed Form Designer Issues: Several regression bugs in the form designer have been addressed, including problems with property pages crashing the compiler, controls not rendering during Form_Initialize, unreliable control movement in UserControl designers, and forms losing their captions during editing.
-
Added Inline Variable Declaration: Added support for inline variable declarations in both standard For loops (
For xyz As DataType = ...
) and For Each loops (For Each x As DataType In y
), bringing more modern syntax options to the language. -
Improved FPU Operations: Fixed multiple floating-point unit (FPU) code generation issues that were causing imprecise Single/Double/Date values and occasional "Overflow" runtime errors.
-
Enhanced COM Reference Management: The COM references search filter now also matches file paths, making it easier to locate libraries when you know the filename but not the descriptive name.
-
Fixed PictureBox and Form State Issues: Addressed problems with PictureBox.AutoSize not working correctly at runtime, Form.WindowState not applying during Form_Load, and issues with 32bpp bitmap rendering.
-
Improved Event Handling: Fixed RaiseEventByName to properly execute all registered event handlers rather than just the first one, and corrected KeyPreview handling for keyboard events.
WARNING: The following issues are present in BETA builds 623 - 707 (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 711
- fixed: missing compiler error for some invalid syntax such as
For For
- fixed: several FPU codegen edge cases that could lead to imprecise Single/Double/Date values or 'Overflow' runtime errors in some cases [ https://github.com/twinbasic/twinbasic/issues/2065 ]
- fixed: missing compiler error for syntax
ProjectName!
[ jovick, discord ] - added: support for
For
syntax inline variable declarationFor xyz As DataType =
- fixed: (regression) opening a property page in the form designer would crash the compiler [ https://github.com/twinbasic/twinbasic/issues/2057 ]
- improved: debugger preservation of FPU stack when hitting and continuing from a breakpoint
BETA 712
- added: support for For-Each syntax inline variable declaration
For Each x As DataType In y
- fixed: (regression) Form load triggered during Form_Initialize event could cause controls to not render [ https://github.com/twinbasic/twinbasic/issues/2051 ]
- improved: COM references search filter now also matches file paths [ https://github.com/twinbasic/twinbasic/issues/2025 ]
BETA 713
- fixed: (regression) moving/resizing controls on a UC designer was not reliable [ sokinkeso, discord ]
BETA 714
- fixed: KeyPreview key events should not fire for manually created HWNDs [ XYplorer, private ]
- fixed: PictureBox.AutoSize = True not working when changing the Picture at runtime [ XYplorer, private ]
- fixed: (regression) Form caption would often get lost during form designer editing [ fafalone, discord ]
BETA 715
- fixed: RaiseEventByName would return as soon as the first registered event handler was executed, rather than executing all registered event handlers [ XYplorer, private ]
- fixed: added DataObject.GetIDataObject method for obtaining the underlying raw IDataObject [ XYplorer, private ]
- fixed: Form.WindowState not working during Form_Load [ XYplorer, private ]
- fixed: WM_SYSKEY messages were not being passed on to KeyPreview form events [ XYplorer, private ]
- fixed: codegen edge case involving ByVal parameters marked as OUT-only in TLBs [ XYplorer, private ]
- fixed: 32bpp bitmaps would sometimes be rendered upside down [ XYplorer, private ]