twinBASIC Update: January 1, 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:


Highlights

Redesigned Preview Button

The form designer Preview button got a makeover for Christmas courtesy of DinyaZ.

Here's the old version:

And here's its replacement, now with a hover-specific background color:

Various Bug Fixes

No major new functionality to report during this holiday week, but there were several bug fixes.  Refer to the changelog below for details.

Around the Web

WatchDirectoryChanges

fafalone has posted another sample twinBASIC project over on GitHub.  His WatchDirectoryChanges application demonstrates how to use the SHChangeNotifyRegister API function to "allow your program to be notified of any changes to files, folders, and other shell objects":

Use SHChangeNotifyRegister and SHChangeNotification_Lock to watch directory changes (64bit compatible)

This appears to be a direct import of some sample VB6 code he posted back in 2015 on vbForums.

Special Thanks from Wayne Phillips

I received the following message the first time I started twinBASIC BETA 218:

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.

WARNING: The following two issues are present in BETA builds 202 - 218 (the latest build as of publication):

  • building ActiveX controls is known to be broken in these builds.  Use BETA 201 instead for that feature.
  • there are known memory leaks in these versions, so memory usage will be higher than normal

BETA 214

  • fixed: (IDE) sometimes the active debug line would not be forced into view
  • improved: (IDE) form designer PREVIEW button has been redesigned [ DinyaZ, discord ]
  • fixed: Controls collection was returning IUnknown entries rather than IDispatch, resulting in some issues
  • fixed: corrections to ScaleMode when SetParent API has been used to change the parent of a control at runtime [ fafalone, discord ]
  • fixed: some controls would not be runtime-resizable by the user through dragging when WS_THICKFRAME style was added via API [ fafalone, discord ]
  • fixed: controls moved by API don't know they've been moved [ https://github.com//issues/1429 ]

BETA 215

  • fixed: (regression) ScaleMode ineffective in BETA 214

BETA 216

  • fixed: BackColor / ForeColor / FontTransparent graphics properties not effective for manual Win API calls [ https://github.com//issues/1434 ]
  • fixed: UserControl property descriptions not showing in the form designer

BETA 217

  • fixed: font caching issue in PictureBox / Form / UserControl [ fafalone, discord ]
  • fixed: PictureBox/UserControl ScaleWidth/ScaleHeight properties were reporting sizes including borders [ fafalone, discord ]
  • fixed: (IDE) closing a non-active tab could leave black area below monaco editor if the number of tab rows reduced
  • fixed: (regression) (IDE) insertion of new events would not place the cursor inside the new event procedure since BETA 214 [ sokinkeso, discord ]
  • fixed: control arrays in a UserControl would expose an erroneous entry in the form designer property sheet [ fafalone, discord ]

BETA 218

  • fixed: Form/PictureBox/UserControl TextWidth function was broken [ fafalone, discord ]
  • improved: further tweaked ScaleWidth/ScaleHeight calculation
  • fixed: VarPtr is now allowable without the result being used, to match VBx handling [ AlienSoft, discord ]
  • improved: some initial fixes put in place for Form resize issues