twinBASIC Update: January 21, 2024

Highlights include a minor delay of the long-awaited twinBASIC IDE update, a new twinBASIC FAQ page, and several new and updated tB projects from fafalone.

twinBASIC Update: January 21, 2024

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

Long-Awaited IDE Release Pushed Back One More Week...

An update from Wayne:

Dear all,

I'm writing to update you on the status of the eagerly awaited new release of twinBASIC that I had previously announced would be available tomorrow.

Regrettably, I must inform you that I need a little more time to polish and ensure the quality of this release. A combination of unforeseen challenges has led to this delay. The past week has been particularly difficult due to the weather conditions in the UK. Additionally, balancing other business pressures alongside unexpected family obligations, such as my kids being off school due to seasonal illness, has impacted the timeline.

I understand that many of you might be disappointed by this news, and I want to express my sincerest apologies for any inconvenience this delay may cause. My commitment to delivering a robust and high-quality update remains, and these extra days are crucial to achieving that.

With this in mind, I am setting a new release date for the update: Wednesday next week. This will allow enough time to address the last-minute issues that have arisen and ensure that I can deliver a product that meets your expectations and my standards.

I appreciate your understanding and patience during this time. Your support and enthusiasm for twinBASIC are what drives me to continually improve and innovate. I am eager and excited to share the new release with you and I'm working extremely hard to make it happen.

Thank you for being a part of our community and for your continued support.

New twinBASIC FAQ Page

fafalone created a twinBASIC FAQ page on the official twinBASIC wiki.

Here's the current list of answered questions:

twinBASIC Frequently Asked Questions

  • General
    • What is twinBASIC?
    • Who is behind twinBASIC?
    • Where can I get twinBASIC?
    • What is the current status of the project?
    • What new features does twinBASIC have compared to VB6?
    • Where can I learn more about twinBASIC, find documentation, and participate in the community?
    • Is twinBASIC Open Source?
    • How much does twinBASIC cost?
    • Can I pay a one-time fee for a perpetual license?
    • Can twinBASIC be used to develop commercial products, and what royalties are owed?
    • What does '100% backwards compatible' mean, technically?
    • So some of my projects won't work?
    • How do I report bugs or other problems?
  • Installation
    • What are the requirements for twinBASIC?
    • twinBASIC won't run; says there's an invalid entry point.
    • How big is the twinBASIC installation?
    • Where is twinBASIC IDE data stored?
  • Using twinBASIC
    • How do I import my VB6 project into twinBASIC?
    • Does twinBASIC support addins?

Discord Chat Summary

* Auto-generated via Claude-2-100k on poe.com

General Channel

Here is a summary of the key points from the General channel transcript:

Overview

  • The twinBASIC community celebrated the launch of a dedicated subforum on vbforums.com for discussions and support.
  • A major update to twinBASIC was delayed due to unforeseen challenges, but is still slated for release soon.
  • Conversations covered diverse topics like new IDE features, bug fixes, language comparisons, and coding best practices.

New Features

  • A new IDE theme manager and light theme were implemented.
  • The IDE's Format menu was fully implemented.

Bugs/Issues

  • Add-in window positions getting messed up was fixed by editing the registry.
  • Silent failures converting LongPtr to String were identified as needing better warnings.
  • Variant pass-by-reference bugs were logged to be addressed.

Language Comparisons

  • Learned VB6 .IDL files can specify structure alignment, a feature twinBASIC also supports.
  • Discussed situations where twinBASIC handles variants more like VB.NET than VB6.

Future Direction

  • The team plans to add more granular control over implicit type conversions.
  • IDE setting storage will likely be made configurable.

Community

  • Members showed understanding about the update delay and offered support.
  • Insightful discussions covered coding best practices.

Overall, progress continues towards the next release while the community remains engaged and supportive. Conversations illustrated twinBASIC's strengths like IDE extensibility and language improvements over VB6.

Docs Channel

Here is a summary of the key points from the Docs channel transcript:

  • A new FAQ page was created on the documentation wiki covering common questions about twinBASIC.

  • The FAQ aims to provide helpful information for new users learning the language.

  • It was suggested as a place to consolidate knowledge from conversations in the community.

  • The FAQ covers topics like differences from VB6, IDE features, language functionality, and more.

  • Community members reacted positively and plan to contribute more content.

  • The FAQ helps lower the barrier to entry for new users and codifies tribal knowledge.

  • It demonstrates the team's commitment to clear documentation and supporting new adopters.

Overall, the new FAQ represents a valuable effort to compile community knowledge into an accessible reference that will benefit new and existing users alike. The initiative to create it reflects twinBASIC's continued progress on the documentation front.

Around the Web

PreviewHandler Sample Project

Another week, another twinBASIC sample project from fafalone: PreviewHandler.

This one is a 64-bit-compatible twinBASIC port of his IPreviewHandler VB6 sample project:

IPreviewHandler: Show non-image file previews from all reg'd preview handlers

IPreviewHandler is what Explorer uses in the Preview Pane, to show previews of various filetypes-- not just images.

Many file types have registered preview handlers, not just images. Typically documents, videos, fonts, music, even registry files, all have a preview handler that you can put on your application with little effort.

While the project itself could be useful, perhaps the most interesting aspect is the process of converting the 32-bit only VB6 project so that it can be compiled for both 32-bit and 64-bit environments in twinBASIC.  In VBA, the typical process is to update all Declare statements with the PtrSafe keyword after reviewing the statement and replacing Long with LongPtr where appropriate, as Philipp Stiefel covers thoroughly here.

Using his recently released WinDevLib twinBASIC package, fafalone takes a radically different approach:

The writeup for this takes you through the process of updating it for x64 compatibility. It shows off how much easier my WinDevLib project makes this. Rather than update 150 lines of Windows API declares, they're simply removed-- WinDevLib covers 100% of them, already in x64-compatible form. Then a number of little details and issues are sorted out, leading to the final version: PreviewHandlerDemo64.twinproj, a fully working implementation of using IPreviewHandler, compatible with 64bit--- which means it can use 64bit-only previewers, which is sometimes an issue for VB6.

As promising as twinBASIC itself is, community projects like WinDevLib–which provides easy-to-implement access (with IntelliSense!) to the power of the Windows API–will play a key role if twinBASIC is to enjoy long-term success.

For more information about using WinDevLib in twinBASIC, check out this conversation between fafalone and Deep Freeze, prompted by this initial question from Deep Freeze:

Hello. I was wondering if there was any  basic win32 apis and structures definition files that i could include in my program to call those apis more easily than defining them myself. If this type of file already exists, may someone send it here?

Bigger Icons for fafalone's ShellControls Project

As announced by fafalone in Discord's show-and-tell channel:

ucShellTree has been updated to v2.9; this update adds support for setting the icons to any size, rather than the fixed small size of the earlier versions. I've only updated tbShellTree.twinproj and ucShellTree.twin/.tbcontrol; I'm waiting until next week with the new tB beta to revisit the combined ucShellBrowse projects.

AccessUI Buttons Added to cTaskDialog64

fafalone also released an update (v1.4) to his cTaskDialog64 project:

After review, I've included the undocumented additional common buttons that were used in the AccessUI version (thanks!). The following .CommonButtons are now available, with their return value given in parentheses:

TDCBF_ABORT_BUTTON     (TD_ABORT)
TDCBF_IGNORE_BUTTON    (TD_IGNORE)
TDCBF_TRYAGAIN_BUTTON  (TD_TRYAGAIN)
TDCBF_CONTINUE_BUTTON  (TD_CONTINUE)

TDCBF_HELP_BUTTON      '**This will raise the Help Event, and will not close the dialog.**

The Help button works everywhere, including MS Access. Unfortunately, the AccessUI version had a typo; the release had 16384 which isn't anything-- but it looks like they just had a typo originally, there's a comment '104857 which of course makes no sense... but if you convert these values to hex, you find &H10000, &H20000, &H40000, and &H80000 for the other new buttons... &H100000 is 1048576 in decimal-- so they just cut off a digit when copying it down. &H100000 works in Access, I checked.

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.

No new releases this week.

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