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:
- Custom twinBASIC IDE Installation Guide (NOTE: the twinBASIC VSCode extension is under a feature freeze until 2023)
- GitHub Issue Tracker (report bugs)
- twinBASIC Discord Server (chat about the project)
- twinBASIC/VBx LinkedIn Group
Support for Graphical Buttons
BETA 183: CommandButton.Style / Picture / DownPicture / DisabledPicture are now supported (i.e. graphical buttons support).
Support for OLE Drag and Drop
BETA 186: all windowed controls now support OLEDropMode = vbManual, and OLEDragOver / OLEDragDrop events.
New GUI Properties, Methods, and Events Implemented
Listed below are all the newly implemented form and control properties, methods, and events:
OptionButton.Style = vbButtonGraphical
FileListBox.OLEDragDrop | OLEDragOverevents
The full list of GUI items yet to be implemented is available here.
Around the Web
RubberDuck 3.0 Might Leverage twinBASIC Features
If you missed it in my Access Week-in-Review article from yesterday, Mathieu Guindon released some huge news about an upcoming major feature upgrade for his open-source RubberduckVBA project:
Rubberduck 3.0 will offer a full replacement for the VBA editor!
Behold, the Rubberduck Editor
Rubberduck’s input was always driven by the Visual Basic Editor – now the code in the VBE is going to be output by Rubberduck. Of course, the code will go both ways, but now hidden attributes probably won’t need to be hidden anymore, and the editor can now be exactly what we envision it to be.
There will only be a single toolwindow that will host the editor and UI components like the Code Explorer. At this early stage my focus is entirely on the editor itself, but the idea is ultimately to get actual document tabs and a more practical and friendly docking manager.
So, what does this have to do with twinBASIC?
It seems that Mathieu and the other Rubberduck maintainers may use twinBASIC behind the scenes to implement some very advanced features in the future. Here's Mathieu's response to a reader question about parsing and compiling VBA (emphasis added):
There is currently only a ViewModel providing data to the editor, and no mechanism is in place yet to move code between the VBE and that ViewModel; I admittedly haven’t looked into what interfaces and protocols are involved in such external editor integration, but it’s definitely not ruled out, and in fact we could probably start experimenting with this by moving the code in and out of twinBASIC.
The Rubberduck3 solution was started from scratch in VS2022/Win11, with just the bare minimum v2.x code to start up: there is literally no parser yet, so all options are still on the table – we can keep the 2.x parser, we can rewrite it wholesale, we can implement it as a language server, or leverage twinBASIC to do it (if tB can be used for that).
Whatever the parsing strategy we settle for, we’ll still want our own VBIDE-integrated editor: that’s what I decided to get the 3.0 ball rolling with.
Exciting times ahead.
Spreadsheet with Form/Control GUI Support Progress
Back on October 9, camomille22003 posted an Excel spreadsheet that showed a the current status of the implementation of intrinsic control properties, methods, and events. The idea was to show a quick visual overview of Wayne's progress implementing GUI support in twinBASIC.
- GREEN: feature is implemented
- RED: feature is not implemented
- WHITE: not applicable
Support Request from Wayne
Wayne Phillips posted the following message in the twinBASIC Discord chat:
The message that follows is meant for those of you that aren't tB licence subscribers 🙂 I've updated our ko-fi supporters goal so that we now have a (hopefully) realistic goal of GBP £600 which will be put towards upgrading the hardware used to compile tB itself. My development process is extremely agile, and as such is heavily affected by the compilation time of the tB codebase. If you can afford a few pounds/dollars/etc to help support us in achieving this goal, here is the link:. https://ko-fi.com/twinbasic
Here are the updates from the past week. You can also find this information by visiting the GitHub twinBASIC Releases page.
- fixed: closing a modal form often resulted in owner window not being focused [ https://github.com//issues/1373 ]
- fixed: form-close problem when using the ShowWindow API with forms [ https://github.com//issues/1374 ]
- added: support for CommandButton.Style = vbButtonGraphical
- added: support for CommandButton.Picture property
- added: support for CommandButton.DownPicture property
- added: support for CommandButton.DisabledPicture property
- added: CommandButton.PictureDpiScaling property
- fixed: position of pictures and text in graphical CommandButtons [ sokinkeso, discord ]
- added: CommandButton.PictureAlignment property (default Top) [ fafalone, discord ]
- added: CommandButton.ForeColor property [ Krool, discord ]
- added: CommandButton.Padding property (for graphical style with picture and text)
- added: support for CheckBox.Style = vbButtonGraphical
- added: CheckBox.Picture property
- added: CheckBox.DownPicture property
- added: CheckBox.DisabledPicture property
- added: CheckBox.PictureDpiScaling property
- added: CheckBox.PictureAlignment property (default Top)
- added: CheckBox.ForeColor property
- added: CheckBox.Padding property
- added: support for OptionButton.Style = vbButtonGraphical
- added: OptionButton.Picture property
- added: OptionButton.DownPicture property
- added: OptionButton.DisabledPicture property
- added: OptionButton.PictureDpiScaling property
- added: OptionButton.PictureAlignment property (default Top)
- added: OptionButton.ForeColor property
- added: OptionButton.Padding property
- added: initial support for OLE drop targets for Windowed controls only, OLEDropMode manual mode only, and OLEDragDrop/OLEDragOver events
- added: DataObject.AvailableFormats collection
- added: DataObject.GetFormatByName method
- added: DataObject.GetDataByName method
- fixed: graphical OptionButton/CheckBox text position issue [ sokinkeso, discord ]
- fixed: TAB focusing was not correctly accounting for disabled and/or invisible controls [ sokinkeso, discord ]
- fixed: ENTER/RETURN key not working on graphical buttons
- fixed: external COM class creation would often crash, since BETA 182 [ rexxitall ]
- fixed: DataObject.AvailableFormats collection sometimes failing during enumeration
- added: support for OLEDropMode Automatic for PictureBox
- added: partial support for OLEDropMode Automatic for TextBox
- added: support for OLEDropMode and associated events for Label control
- added: support for OLEDropMode and associated events for Image control (inc Automatic mode)
- added: vbOLEDropAutomatic is now hidden in the form designer for controls that don't support it
- fixed: (regression) ActiveX controls issues since BETA 186 [ https://github.com//issues/1383 ]