twinBASIC Update: July 21, 2025

Highlights include the ability to import individual components from a VBP or TWINPROJ file and improvements to the Eval() function.

twinBASIC Update: July 21, 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

Import Individual Files from .vbp/.twinproj Files

From Wayne in Discord:

BETA 861 now has the ability available to import individual components from a VBP or TWINPROJ file.

PROJECT EXPLORER context menu -> Import...

Eval() Enhancements

*As summarized by Gemini-2.5-Pro

The Eval() function received significant improvements over the past week, with two key updates addressing community feedback and expanding its capabilities. These changes enhance both the robustness and the feature set of the expression evaluation service.

  • Parser Bug Fix (BETA 864): A bug in the Eval() parser was corrected. Previously, the parser required whitespace or another terminator character to follow a multiplication symbol (*) for an expression to be evaluated correctly. This fix makes the parser more flexible.
  • Exponent Notation Support (BETA 866): In a major improvement, the Eval() function was enhanced to support numbers expressed in scientific (exponent) form. This allows for the direct evaluation of expressions containing values like 1.23E-04, greatly increasing the function's utility for scientific and mathematical calculations.

Discord Chat Summary

* Auto-generated via Gemini-2.5-Pro

Overview

This week saw significant progress with the release of BETA 861, introducing a much-anticipated feature for importing individual components from VBP and TWINPROJ files. [1] The community was highly engaged, uncovering a major regression in error handling for compiled executables, which was promptly acknowledged. Discussions also covered future language enhancements like lambdas, ongoing VB6 compatibility efforts, and practical support for using packages like WinDevLib.

Bug Fixes & Improvements

  • A critical regression was identified where unhandled errors in compiled EXEs cause the application to hang silently instead of crashing. waynephillipsea confirmed this has been an issue since BETA 696.
  • Some users reported intermittent project loading failures in recent beta builds (862-865), which often resolved themselves on a second attempt.
  • The MousePointer property was a point of confusion for new users importing VB6 projects. fafalone clarified that this is often due to twinBASIC's default Option Explicit setting, which prevents the implicit creation of a variable named MousePointer in standard modules.
  • An annoying beep sound when using XAML keyboard accelerators (e.g., Alt+K) in twinBASIC, which doesn't occur in VB6, was reported.

Feature Development & IDE

  • BETA 861 was released, featuring the new ability to import individual components (like forms or modules) directly from VBP or TWINPROJ files. [1] waynephillipsea noted that this is a first implementation and will be enhanced later to show more details like module and class names within the import dialog.
  • A discussion around partial recompilation continued, with waynephillipsea confirming he is working on a nuanced approach similar in concept to red-green trees to improve IDE performance, especially for large projects.
  • A known issue where the IDE doesn't automatically refactor Exit Sub/End Sub when a Sub is changed to a Function was acknowledged.
  • Users expressed appreciation for quality-of-life IDE features, such as automatically enclosing a selection in quotes or parentheses.

Language Enhancements & Future Ideas

  • A conversation about introducing lambda functions to twinBASIC was initiated by mansellan, who plans to create a formal proposal. The discussion touched on finding a syntax that feels natural to BASIC and the potential for method groups to help.
  • bclothier raised the possibility of implementing Option Compare Database by allowing the project's default codepage to be changed at runtime.
  • A user question about the difference between vbaObjSetAddref and a standard Set assignment led to a technical explanation from fafalone and wqweto about reference counting and proper usage to avoid memory leaks.
  • waynephillipsea stated that providing support for compiling complex static libraries like pcre2 is currently a low priority.

Community Support & Libraries

  • fafalone and waynephillipsea provided instructions on how a user could revert to a previous version of the VBCCR package to resolve an issue, involving using it as a linked package instead of an embedded one.
  • Several users sought help with fafalone's WinDevLib. It was clarified that the library contains thousands of API declarations, making Sleep and other functions available without manual Declare statements. [2][3]
  • A user experienced their project file size ballooning after adding WinDevLib. fafalone advised unchecking the "Embed" option for the package, which links it instead of including it directly in the .twinproj file, resolving the issue. [4]
  • Questions arose about reporting tools. wqweto and fafalone explained that while ActiveX Designers like ActiveReports are not supported, twinBASIC has its own built-in reporting feature, and ActiveX report controls like those from Crystal Reports should still work.

Conclusion

The week was marked by a major step forward in project migration with the new component import feature, demonstrating continued progress towards the v1.0 release. [5] The community's active testing and bug reporting proved invaluable, quickly bringing a significant error-handling regression to light. Forward-looking discussions on advanced language features like lambdas show a healthy interest in evolving twinBASIC beyond its VB6/VBA compatibility roots, while ongoing support for popular libraries and migration challenges remains a key focus.


Learn more:

  1. Releases · twinbasic/twinbasic - GitHub
  2. WinDevLib: A Better Way to Call Windows API Functions in twinBASIC - No Longer Set
  3. twinBASIC Update: January 14, 2024 - No Longer Set
  4. twinBASIC Update: June 30, 2025 - No Longer Set
  5. twinBASIC Frequently Asked Questions

Around the Web

No major news to report this week.

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 Gemini-2.5-Pro, sorted in order of its opinion of "most impactful changes."

Enhanced Project Import Capabilities - The Import feature now allows importing individual files from both TWINPROJ and VBP files through the Project Explorer context menu, making project migration more flexible

Focus Management Improvements - Fixed critical focus issues including ComboBox controls not receiving proper focus when clicking after switching between applications, ensuring VB6-compatible behavior

Eval() Function Enhancements - Added support for numbers in exponent form and improved multiplication symbol parsing, expanding the mathematical expression capabilities

Property Page and Control Fixes - Resolved broken ImageList property page functionality and addressed various ComboBox event timing issues during form load

Parser and Compiler Robustness - Improved handling of line continuation characters in dot-expressions, better literal string termination matching VBx behavior, and converted some compiler errors to warnings for better VB6 compatibility

UserControl Stability - Fixed runtime errors when accessing ControlName during Initialize events and resolved conflicts between custom Enabled properties and built-in graphics implementation

These updates focus on improving VB6 compatibility while enhancing the development experience with better import tools and more robust parsing capabilities.


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.
  • KNOWN ISSUE: Controls are not being destroyed properly by the form designer, causing big memory leaks (broken in this build)

BETA 861

  • improved: Import feature (PROJECT EXPLORER context menu -> Import...) now allows importing individual files from TWINPROJ and VBP files

BETA 862

  • fixed: Import VBP/TWINPROJ feature treeview would disappear when collapsing nodes [ AntsAntix, discord ]
  • fixed: OLEDragOver/OLEDragDrop events were not correctly populating the Shift argument [ XYplorer, discord ]
  • fixed: ComboBox focus issue when focus is moved away to another window and then to a ComboBox control [#2199]
  • fixed: Printer.TextWidth/TextHeight incorrectly defined with ByRef input param [ fafalone, private/3 ]
  • fixed: Keyword 'Randomize' should not be allowed as a line label, to match VBx [ fafalone, private/4 ]
  • fixed: type library loading adjustments, so the cached typelib path is now only used as a final fallback [ fafalone, private/6 ]

BETA 863

  • fixed: (regression in BETA 861) broken MDIForm implementation due to changes to TextWidth/Height [ John, discord ]

BETA 864

  • fixed: bug in Eval() parser requiring whitespace or other terminator after a multiplication symbol [ loquat, discord ]
  • fixed: (regression) ImageList property page has been broken for a number of releases [#2200]
  • fixed: parser error when encountering a line continuation character in the middle of a dot-expression [ fafalone, private/10 ]
  • fixed: changed parser handling of bad literal strings termination to better match VBx [ fafalone, private/17 ]
  • fixed: errors in Attribute VB_Name syntax no longer throw a compiler error, but a warning instead to better match VBx [ fafalone, private/17 ]

BETA 865

  • fixed: truncation of error text 'duplicate definition in the current scope' in some instances [ fafalone, discord ]
  • fixed: ComboBox Change event fires incorrectly during form load if Text property has been set at design time [ fafalone, private/21 ]
  • fixed: enum-member resolution in a class was not higher priority than base class members [ fafalone, private/24 ]
  • fixed: resolving of LoadPicture() would sometimes bind to stdole instead of Global implementation [ fafalone, private/25 ]

BETA 866

  • fixed: edge case setting control positioning issue [ fafalone, private/29 ]
  • fixed: PictureBox excessive flashing issue when resizing in some instances [ fafalone, private/29 ]
  • improved: Eval() now supports number expressed in exponent form [ loquat, discord ]
  • fixed: accessing UserControl.ControlName inside UserControl_Initialize event would throw a runtime error [ fafalone, private/30 ]
  • fixed: UserControl with a custom Enabled property interferes with built-in graphics implementation [ fafalone, private/41 ]

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