twinBASIC Update: September 18, 2022

Highlights include the initial implementation of a PictureBox control and a custom Windows Event Viewer written in twinBASIC.

twinBASIC Update: September 18, 2022

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:


PictureBox: Initial Implementation

A PictureBox control was added with support for the following properties and methods:

  • Circle
  • Line
  • PSet
  • Print
  • TextWidth
  • TextHeight
  • Cls
  • Picture
  • hDC
  • CurrentX
  • CurrentY
  • FillColor
  • FillStyle
  • BackColor
  • ForeColor
  • DrawWidth
  • DrawMode
  • DrawStyle
  • AutoRedraw
  • FontTransparent
  • Refresh

I assume this required some tender loving care for the compiler, as the syntax for some of these methods–such as Circle, Line, and PSet–are quite unique in the VBx world.

Some notable methods currently missing from the PictureBox implementation are:

  • PaintPicture
  • Point

Around the Web

VB6 Form Import Up Next

This is the moment many in the VB6 community have been waiting for.  Initial support for importing VB6 .frm objects is just around the corner.  Here's Wayne's comment from a couple of days ago:

Although the PictureBox work went a little over time, importing of VB6 forms is literally next on the list, and should be available early next week.

With some luck, importing of VB6 forms will be in the Highlights section of this update next week.

Best Alternative to VB6 for teaching and training

Over at, someone asked for VB6 alternatives for teaching and training in 2022.  While no clear concensus emerged, twinBASIC and Free Pascal (with the Lazarus IDE) were two of the most popular recommendations.  

TBEventTrace v2.2.2

TBEventTrace is a 64-bit-compatible, twinBASIC port of fafalone's custom VB6 Windows Event Tracing File Activity Monitor.

Somehow I missed this program when fafalone first released it back in July, but his latest version makes use of new twinBASIC features from BETA 122:

-twinBASIC now allows AddressOf on Function class members, and now has a PictureBox control. The project has been updated to put all subclassing and related back in the main form and use a PictureBox for the More Options popup now identical to the VB version.


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.

BETA 120

  • added: syntax support for Print (IVBPrint), Circle, Line, PSet, Scale [ ]
  • added: PictureBox control with initial implementations for Circle, Line, PSet, Print, TextWidth, TextHeight, Cls, Picture, hDC, CurrentX, CurrentY, FillColor, FillStyle, BackColor, ForeColor, DrawWidth, DrawMode, DrawStyle, AutoRedraw, FontTransparent
  • fixed: some x64 codegen issues involving calls with multiple FPU arguments

BETA 121

  • fixed: hover tooltips for IDE elements were sometimes showing only partial datatype qualifiers [ fafalone, discord ]
  • improved: functions marked with [DllExport] attribute must now have unique names to avoid build failure
  • improved: rename action on the root project folder node in the PROJECT EXPLORER panel now updates the project name in the Settings file [ GrandPaM, discord ]
  • fixed: leaving a search window open after a 'find in files' action in the IDE causes hang when closing the project [ ]
  • improved: built-in package exposure has now been tamed to avoid conflicts with own-defined versions of types and constants [ fafalone, discord ]

BETA 122

  • improved: AddressOf on class members is now allowed for Functions as well as Subs, for functions returning integral types [ ]
  • fixed: an error at resolving one constant value no longer affects all remaining constants in the same component [ ]
  • fixed: MousePointer property not working (all controls) [ ]
  • fixed: PictureBox HWND class inheriting from STATIC class rather than using DefWindowProc [ ]
  • fixed: Create event was not firing for ThunderFrame, leading to the frame not having its Font properties set
  • added: IDE option 'IDE: Show Hidden Members' (default: NO, requires restart)

BETA 123

  • improved: sharpened some of the IDE toolbox icons
  • fixed: PictureBox TextWidth and TextHeight were returning incorrectly DPI scaled pixel values
  • fixed: PictureBox.Refresh not working when AutoRedraw = True
  • improved: Form now exposes DpiScaleFactorX/Y properties (double)
  • fixed: mouse capture and ordering of mouse Click/Up events to match VB6 on all controls [ ]

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