twinBASIC Update: April 29, 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:
- 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
Experimental Multi-Frame Control
So you can now experiment with the new MultiFrame control in BETA 751. Highly experimental, but potentially very useful for creating fluid GUIs without any code for doing layouts. It is essentially a stack of frames, either horizontal or vertical, with the control itself controlling the layout of the inner frames. Each frame can be set to a percentage width/height (MultiFrameSize), or zero (default) for "automatic". The frames set to automatic size will split the remaining space of the control equally, so for example, you can have one frame set to 30%, and then two frames set to automatic, and the layout will be 30%-40%-40%. Each frame can of course hold other controls, supporting anchoring and docking within them.
To use it, drop the MultiFrame control onto a form, set the FramesCount property in the property sheet. To set the layout of the frames, select each frame and set the MultiFrameSize property in the property sheet (e.g. a value of 30 means 30%).
Wayne posted a sample twinBASIC project in Discord, which I've uploaded here for your convenience:
The sample above shows a simple form with a 3-pane Multi-Frame control. The sample form includes a single instance of the multi-frame control with three frames:
- Frame 1 (green) occupies 20% of the horizontal space of the frame
- Frame 3 (orange) occupies 10% of the horizontal space
- Frame 2 (purple) occupies the remaining 70% automatically
Here are some screenshots of the test form when running the application:
Wayne created a short screencast of the feature and posted it in Discord. Once again, I'm making it available here for your convenience:
Discord Chat Summary
* Auto-generated via Claude-3.7-Sonnet
Overview
This week in the twinBASIC community saw significant progress on multiple fronts, highlighted by Wayne's introduction of the experimental MultiFrame control for fluid GUI layouts. Community development continued with mansellan's release of the first generics-based TwinPack and discussions around COM interfaces and typelibs. The week also featured Mike Wolfe's twinBASIC update presentation at Access DevCon 2025.
New UI Control: MultiFrame
- Wayne introduced a highly experimental MultiFrame control in BETA 751, allowing developers to create fluid GUIs without writing layout code. The control functions as a stack of frames (horizontal or vertical) where each frame can be set to a percentage width/height or automatic sizing.
- The control supports nesting MultiFrames within each other, enabling complex layouts with minimal code. Wayne demonstrated the control's capabilities with sample projects showing responsive layouts that automatically adjust when resized.
- Future enhancements may include drag-and-drop support for frame positioning, runtime frame addition/removal, and mixed percentage/fixed-width frame sizing options.
Generics Development
- Mansellan published the first TwinPack featuring generics implementation, focusing on tuple classes as a starting point. His implementation demonstrates how functions can return "multiple" values using generic classes.
- Wayne confirmed that type inference is supported using
Dim variable As Any = Function()
syntax, though the final implementation may change. - The current implementation requires different class names for different tuple sizes (TupleOf2, TupleOf3) since generics cannot yet be overloaded by their generic parameters.
COM Interface & TypeLib Discussions
- Fafalone and b.a.k.a. discussed issues with Direct2D interfaces in oleexp.tlb, particularly around method overloading in inherited interfaces.
- Wayne noted that license checks for coclasses (even without [ComControl]) were added to help identify ActiveX controls causing hard crashes during license checks.
- Fafalone explored static linking challenges with libraries missing exports, particularly when working with LoadMUILibraryW and related functions.
Community Growth
- The Access DevCon 2025 presentation by Mike Wolfe was shared, highlighting twinBASIC's progress to a wider audience.
- Several community members discussed migration strategies for large VB6 projects, with fafalone noting that projects of 150-200K lines of code have been successfully migrated.
- Sokinkeso released AutoSave addin v3.0 with new features for the twinBASIC IDE.
Conclusion
This week demonstrated twinBASIC's continued evolution beyond basic VB6 compatibility into a modern development platform with advanced UI capabilities and language features. The experimental MultiFrame control represents a significant step forward in UI design capabilities, while the community's work on generics shows growing interest in leveraging twinBASIC's modern language features. With the Access DevCon presentation and ongoing migration discussions, the project continues to build momentum toward its v1.0 release while laying groundwork for future enhancements.
Around the Web
twinBASIC at DevCon Vienna 2025 Video Released
Special thanks to conference organizer and Access MVP, Karl Donaubauer, for once again making my annual twinBASIC update presentation available to the general public (and not just paying conference attendees). The video is on YouTube:
Show and Tell
Messenger UI Demo ported from VB6
I had originally made this application in a more Discord UI style using Electron, however, the user base this app is intended for wasn't very Discord-savvy and wanted a more traditional Multi-Windowed application circa ICQ/AIM, something that while possible with Electron isn't ideal as every new Window is a Chromium instance and thus 4-5 Messages would quickly add up to around 1G Memory usage.
As VB is my secondary language I fell back to VB6, but, I hated all the UI controls so I didn't use any of them and instead essentially treated VB6 in the same fashion as Electron in the sense that this application has zero UI controls and is instead is 100% just an IE browser plugin with injected HTML using the Before_Navigation functionality of the control to stop attempts to Navigate to linked URIs and instea decode them and run them as VB functions, e.g., clicking to Message a user translates to launching a new instance of the DM Window passing the information to it to begin (or re-open) the Conversation.
Interestingly even with the main Buddylist open and even 6 DM Windows spawned even in Native VB6 this only used around 30MB of Memory.
Will be interesting to see how these numbers translate as I refine it for twinBASIC.
AutoSave IDE Addin - v3.0 Release
Release notes via GitHub:
2025-04-23 v3.0.0.0 *** compiled with beta 748
• added: new feature: Save Before Project run
• fixed: some minor graph issues
• fixed: msgbox default button not set
Check out the full thread in the show-and-tell Discord channel.
Asterisk-AMI-ClickToCall
Asterisk AMI ClickToCall
A lightweight Click-to-Call solution for Asterisk PBX, built with TwinBASIC/VB6. This application enables web-based click-to-call functionality, allowing users to initiate phone calls directly from a web interface.
Find DLL exporting symbol
.So this is a little bit of a niche tool, but I got tired of manually looking for functions that had their DLL documented wrong or not documented by Microsoft for my WinDevLib project.
It reads all the exports in the IMAGE_EXPORT_DIRECTORY, so might be of some interest for learning too.
Tech Demo of graphics technique called Mode7
Mode 7 is a graphics mode introduced with the Super Nintendo Entertainment System (SNES). It allows a single background layer to be rotated and scaled on a scanline-by-scanline basis, creating effects like perspective and depth. This technique simulates a 3D environment on a 2D platform, making it revolutionary for its time. It was widely used in games like Super Mario Kart and Final Fantasy VI to create immersive and dynamic visuals.
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.7-Sonnet, sorted in order of its opinion of "most impactful changes."
twinBASIC Beta Update Highlights
-
Added: Menu Shortcuts Support - New functionality for implementing keyboard shortcuts in application menus, enhancing user experience and accessibility.
-
Added: Experimental MultiFrame Control - A new highly experimental control that enables flexible, no-code layout of frames when used with anchoring and docking features.
-
Fixed: Form Font Inheritance - Restored the behavior where newly placed controls in the form designer inherit the parent form's font settings (regression since Beta 623).
-
Fixed: Several Memory Leaks - Addressed memory leaks in built-in functions like Split() and Filter(), improving application performance and stability.
-
Fixed: Multiple Form Event Issues - Resolved problems with Form events including recursively triggered Resize events, PopupMenu Click events, and form destruction bugs that could cause access violations.
WARNING: The following issues are present in BETA builds 623 - 751 (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 744
- fixed: some graphical flickering/tearing when repainting a Form or UserControl. Definitely not a regression. [ VanGoghGaming, discord ]
- fixed: (regression since BETA 623) newly placed controls in the form designer now inherit the form font once again [ https://github.com/twinbasic/twinbasic/issues/2054 ]
- fixed: OptionButton/CheckBox Style property was not being correctly configured for runtime added control array elements [ sokinkeso, discord ]
- improved: TLB dissassembly (TLB viewer) now doesn't show redundant spaces in attributes [ Krool, discord ]
BETA 745
- added: support for menu shortcuts [ commissioned work ]
BETA 746
- fixed: control font handles would be recreated in some circumstances, e.g. when resizing AutoRedraw picture box (noticable when using WM_GETFONT to obtain a control font) [ XYplorer, discord ]
BETA 747
- fixed: (regression) Form destruction bug that can cause an access violation during form closure [ XYplorer, private ]
BETA 748
- fixed: Form.PopupMenu method would not trigger the Click event of the root menu [ XYplorer, private ]
- fixed: Dir() internal string leak [ forliny, discord ]
- fixed: AddIn extensibility Project.SaveMetaData method could crash [ sokinkeso, discord ]
BETA 749
- fixed: memory leak in built-in function Split() [ forliny, discord ]
- fixed: memory leak in built-in function Filter() [ forliny, discord ]
BETA 750
- fixed: Form Resize event could be triggered recursively [ XYplorer, discord ]
- fixed: RaiseEvent could miss further connection points if the current connection point is disconnected whilst executing the event [ XYplorer, discord ]
- fixed: OLE IDropTarget::DragEnter implementation was dismissing events if hovering over a child window of the target [ XYplorer, discord ]
BETA 751
- added: highly experimental MultiFrame control, allowing for no-code flexible layout of frames when used in conjunction with anchoring and docking