twinBASIC Update: February 24, 2025

Highlights include an update to fafalone's twinBASIC ribbon demo sample project and a bug-hunting expedition as twinBASIC nears its v1.0 release date.

twinBASIC Update: February 24, 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

Bug Hunting

Over the past week, Wayne–along with several community volunteers–closed 28 open GitHub issues.

The issues were closed for a variety of reasons:

  • Bug fixes released in BETAs 686-696 (see Changelog below)
  • Issues that are no longer reproducible (likely resolved via earlier bug fixes)
  • Bugs identified in third-party applications (e.g., the RC6 cCollection class)

As tB nears its 1.0 milestone, Wayne and other community members have apparently begun a push to clean up as many of these outstanding issues as possible.

If you've got the time and interest to test open issues against newer BETA versions of twinBASIC, I'm sure Wayne would greatly appreciate any help you can provide.

Here is a list of open confirmed bugs listed in ascending order of last updated (i.e., the ones that are most likely to have been "silently" fixed via earlier beta releases).

Discord Chat Summary

* Auto-generated via Claude-3.5-Sonnet-200k on poe.com

Overview

This week saw reduced development activity due to Wayne's family commitments, but significant discussions emerged around COM registration, error handling improvements, and file I/O functionality. The community actively engaged in troubleshooting deployment challenges and exploring potential future enhancements for twinBASIC's error reporting and virtualization capabilities.

COM Registration & Deployment

  • Community members worked through challenges with COM component registration and deployment, particularly focusing on proper handling of 32-bit vs 64-bit dependencies
  • bclothier highlighted modern best practices, suggesting moving away from system folder modifications for component registration
  • A discussion emerged about potentially implementing sandbox virtualization similar to O365 to improve deployment security

Error Handling & Debugging

  • Wayne proposed adding an "enhanced error messages" toggle in project settings to provide additional context like CLSIDs and control names during runtime errors
  • Issues with IEnumVARIANT implementation requirements were identified and addressed in Beta 695
  • Discussion began about improving break behavior in class modules to better match VB6 functionality

IDE & Development

  • A bug was identified and fixed regarding the Line drawing command syntax, specifically affecting the Line -(x,y) format
  • Wayne confirmed that the Me. prefix requirement was removed in Beta 687, while maintaining backward compatibility
  • The team clarified that twinBASIC doesn't auto-register .tlb files when imported as references, providing more predictable behavior

File I/O Functionality

  • Users reported and investigated issues with sequential file operations using Print #
  • Wayne provided guidance on troubleshooting file I/O operations by starting with simplified test cases
  • The community worked through proper file handling practices, including using FreeFile for file number management

Conclusion

Despite the slower development pace this week, the community remained actively engaged in improving twinBASIC's functionality and reliability. Significant attention was paid to deployment challenges and error handling improvements, with Wayne providing key architectural decisions about future enhancements. The discussions around virtualization and enhanced error reporting suggest a strong focus on modernizing legacy VB6 patterns while maintaining compatibility.

Around the Web

Project Updated: UIRibbonDemoAdvanced v4.1.4

fafalone posted the following update in the Discord show-and-tell channel:

This update adds a couple new features of note: First, there's a much more powerful MiniToolBar that pops up on right clicking the RichEdit; it shows how you can add a font control and a ComboBox that can be used interactively, here to create an inline Find function. Also images are now inserted by IRichEditOle; this not only means the clipboard isn't hijacked on Win7, but the original EM_SETIMAGE method, although seemingly identical in every respect, didn't recognize the image as an embedded OLE object, which was required for the other new feature, the Resize and Change Picture buttons are now functional, the former displaying a small popup resize dialog just like Wordpad.

Check out the project on GitHub:

GitHub - fafalone/UIRibbonDemoAdvanced: Windows UI Ribbon Framework Demo - Advanced w/ Direct2D
Windows UI Ribbon Framework Demo - Advanced w/ Direct2D - fafalone/UIRibbonDemoAdvanced

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 Claude-3.5-Sonnet, sorted in order of its opinion of "most impactful changes."

Here's a concise summary of the notable updates in twinBASIC:

  • IDE Improvements: Added configurable mini-toolbar for in-place editing in the form designer, with new commands for keyboard shortcut assignments and improved tab caption rendering

  • Major Bug Fixes: Resolved critical issues including array handling with 'As New' declarations on Win64 builds, proper error propagation in compiled EXEs, and fixed-length string assignment operations now using memmove semantics

  • Control Enhancements: Added BorderStyle property to ProgressBar control, improved Slider SelStart/SelLength properties to better match MS common controls, and fixed anchoring behaviors for form minimization/maximization

  • VB Compatibility: Better alignment with VB6/VBA behavior in several areas including Select Case implicit conversions, control array argument passing, and IEnumVARIANT handling

  • Runtime Fixes: Resolved various UI issues including menu bar flashing, cursor behavior during control movement, and proper handling of form window ownership hierarchies

The updates show continued focus on both IDE functionality improvements and maintaining strict compatibility with VB6/VBA behavior.


WARNING: The following issues are present in BETA builds 623 - 696 (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 686

  • added: IDE setting IDE: Show mini-toolbar in the form designer (for in-place editing) (default TRUE) [ Brooks, discord ]
  • added: IDE commands tbFormDesigner_TurnInPlaceEditingToolbarOn, tbFormDesigner_TurnInPlaceEditingToolbarOff, tbFormDesigner_ToggleInPlaceEditingToolbar available for keyboard shortcut assignments [ Brooks, discord ]
  • fixed: menu bar flashing when toggling Menu.Visible property at runtime [ XYplorer, discord ]
  • fixed: (IDE) in single row of tabs mode, long document titles could be rendered incorrectly in the tab caption

BETA 687

  • fixed: anchoring bug when form is minimized before any manual form resize occurs [ sokinkeso, discord ]
  • fixed: some edge cases around Line statement parsing [ dannyb1896, discord ]
  • fixed: cursor flashing when moving controls in the form designer [ sokinkeso, discord ]

BETA 688

  • fixed: anchoring bug when form is maximized before any manual form resize occurs [ sokinkeso, discord ]

BETA 689

BETA 690

BETA 691

BETA 692

BETA 693

BETA 694

BETA 695

BETA 696

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