twinBASIC Update: May 14, 2023

Highlights include the return of regular twinBASIC releases, the twinBASIC Update video from Access DevCon Vienna, and multiple tB appearances on Hacker News.

twinBASIC Update: May 14, 2023

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, 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, tweet me @NoLongerSet or email me at mike at nolongerset dot com.

Here are some links to get involved with the project:


Bug Fixes and IDE Performance Improvements

Probably the biggest highlight this week is not any particular bug fix or feature, but rather the fact that we had new releases at all.  Beta 298 came out on May 12, 2023, nearly a full month after Beta 297 which Wayne released on April 16, 2023.

twinBASIC–in its pre-release form–does not yet have enough paying subscribers to support its full-time development.  That reality became apparent for the first time over the past few weeks as Wayne had to spend time focusing on the Access custom software development work that funds much of the twinBASIC project.

For full details of the recent releases, refer to the changelog below.  Here are the fixes and improvements I found most noteworthy:

  • Project name is now used as the default file name when saving a new project
  • Project description and app-title settings are now auto-set for new projects (based on project name)
  • New project setting: Project: Register DLL after build (default: True)
  • VARIABLES debugging panel now limits display of array elements to first 1000 elements for performance concerns
  • Exposed the MSVBVM60 redirected functions via [_HiddenModule]: GetMem1/GetMem2/GetMem3/GetMem4/PutMem1/PutMem2/PutMem4/PutMem8/vbaObjSetAddref/vbaObjSet/vbaCopyBytes/vbaCopyBytesZero

Tip About Using Multiple twinBASIC Packages

User FullValueRider and Wayne Phillips had a brief exchange about using multiple twinBASIC packages in a project.  Wayne's responses felt like they could help others, so I'm reproducing the exchange here:

FVR: I'm seeing a problem when trying to add more than one TwinBasic package to a project.  In the settings page all packages appear in the available packages box but only one appears in the enabled references.  All packages added appear in project explorer/packages directory but only the first added package actually works.  Is this the expected behviour?
Just to be clear I'm trying to import the twinBasic packages from local folders.
Wayne: Should work.  Check the project GUIDs are different.  Also check the project name is different.
FVR: It was the Guid.  The only thing I didn't check as I assumed they were unique for each project.  Very useful to know.  Thanks for the pointer.
Wayne: They are generated uniquely when you create the project/package, but if you copy the twinproj file you'll get a duplicate
FVR: Yes.  Its very likely the project was copied so that's another useful tip.

Around the Web

twinBASIC DevCon Vienna 2023 Video Released

In case you missed it from earlier this week, my twinBASIC presentation to Access DevCon Vienna 2023 is now available to view on YouTube:

Hacker News: TwinBASIC is a modern BASIC compiler

TwinBASIC is a modern BASIC compiler | Hacker News

Show and Tell Discord Channel

Wayne Phillips created a dedicated Discord channel for users to post examples of how they are using twinBASIC in the real world.  If you are using twinBASIC for anything, be sure to drop by and leave a message with a description of the project and, if possible, a link to a public repository where the code lives.


SeleniumVBA is one of the first entries in the new "show-and-tell" Discord channel.

Here's how author @GCuser99 describes SeleniumVBA:

SeleniumVBA can be used to automate the Google Chrome, MS Edge, and Firefox web browsers in MS Windows from MS Office applications. Three components are needed to use SeleniumVBA – one of the automation solutions from this GitHub repository, at least one installed web browser, and the Selenium WebDriver(s) corresponding to the installed web browser(s).

Color Emoji Demo

fafalone is at it again.  This time with his twinBASIC DirectX Color Emoji Demo:

Unfortunately the basic Windows GDI functions don't support colored fonts, so even if you have Unicode-supporting controls, your emojis would only show in black and white, just like when you paste them in Windows Explorer. This is a simple demo that shows how to use Direct2D and DirectWrite to display emojis in color. It's mostly based on this C++ example by Code Doggo; for simplicity, I render it directly onto a Form rather than create my own window, which would be less useful for tB programmers anyway. There's limited use in this current forum, the ultimate goal here would be to turn this into an edit control.

TLS 1.3 Stack Written in Visual Basic 6

Frequent twinBASIC commenter wqweto made Hacker News recently with an article highlighting his project, VbAsyncSocket, which includes TLS 1.3 support written in pure VB6.  While the code itself was not written in tB, the article included several positive mentions of twinBASIC throughout the comments.


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.

WARNING: The following issue is present in BETA builds 202 - 300 (the latest build as of publication):

  • there are known memory leaks in these versions, so memory usage will be higher than normal

BETA 298

  • fixed: reported memory usage with the "IDE: Show memory and resource usage" option would sometimes show as an incorrect negative value
  • fixed: incorrect handling of [PreserveSig] attribute alongside UDT return types [ fafalone, discord ]
  • fixed: type-lib viewer handling of Alias declarations of unsupported types showed an incomplete Alias definition [ fafalone, discord ]
  • improved: timing issue where semantic highlighting would be invalid in some instances when editing large code documents
  • improved: stricter verification of integral literals that have data type suffixes, to match VBx [ bclothier, discord ]
  • improved: project name is now used as the default file name when first saving a new project [ sokinkeso, discord ]
  • improved: project description and app-title settings are now auto-set for new projects, based on the entered project name [ sokinkeso, discord ]
  • added: project setting 'Project: Register DLL after build', default TRUE [ fafalone, discord ]
  • fixed: whilst debugging, hovering over a variable containing a string would display the string content as formatted HTML [ ]
  • improved: TypeHint parameter attributes now allow for specifying multiple datatypes (allows combining Enum types for intellisense purposes) [ fafalone, discord ]

BETA 299

  • fixed: The IDE was handling some cases of NATIVE EXCEPTION incorrectly, causing the debugging session to be restarted even if the exception is designed to be caught in a handler [ fafalone, discord ]

BETA 300

  • improved: continuable nativecode exceptions are now reported less prominently in the IDE
  • fixed: VARIABLES debugging panel now limits display of array elements to first 1000 elements for performance concerns
  • improved: exposed the MSVBVM60 redirected functions via [_HiddenModule]: GetMem1/GetMem2/GetMem3/GetMem4/PutMem1/PutMem2/PutMem4/PutMem8/vbaObjSetAddref/vbaObjSet/vbaCopyBytes/vbaCopyBytesZero [ fafalone, discord ]