---
title: "The code I wrote in 2001 is still on the internet"
description: "Searching my own name turned up a Visual Basic 6 Aqua button I put on Planet Source Code in 2001, so I went back and read the code."
url: "https://rayson.me/writing/aqua-button/"
category: "Engineering"
author: "Janarayson"
published: 2026-10-19
---

I was recently checking what comes up when someone searches for my name online (come on, don't we all?). Among the results was a Visual Basic 6 project I submitted to Planet Source Code back in September 2001. It's an Aqua-style button for Windows, and someone has since archived the entire project on GitHub.

I opened the repository and went through the code. It's a little embarrassing.

## Why an Aqua button

In 2001, I was still fairly new to programming and starting to take an interest in building user interfaces. I was using Visual Basic 6, which made it relatively easy to put together Windows applications.

Windows itself was pretty boring to look at. Most applications used the same grey buttons, text boxes and menus, and there wasn't much you could do with the standard controls if you wanted something different.

Then Apple came along with Mac OS X and its Aqua interface, which looked nothing like Windows. The buttons were glossy and rounded, with gradients, highlights and a translucent appearance.

<Figure
  src={emptyTrash}
  alt="Mac OS X 10.0's blue desktop and Dock, with a Finder dialog asking whether to empty the Trash and two pill-shaped buttons, a white Cancel and a blue OK"
  caption="The Aqua buttons in Mac OS X 10.0, white for Cancel and blue for OK. Screenshot from 512 Pixels' Aqua Screenshot Library."
/>

<Figure
  src={printSheet}
  alt="TextEdit's Print sheet in Mac OS X 10.0, with Aqua pop-up menus, Preview, Cancel and Print buttons, and the red, yellow and green window buttons on the document behind it"
  caption="TextEdit's Print sheet in Mac OS X 10.0. Screenshot from 512 Pixels' Aqua Screenshot Library."
/>

I really liked the look, and wanted to see if I could recreate some of it on Windows, starting with the button. I only knew VB6 at the time, so that was what I used.

I wasn't a Mac fan, though. The description I wrote for the Planet Source Code listing says so:

> I'm not a mac fan but .... sure wish Microsoft would do something about their interface ... Luna is a good start :)

Luna was the new look coming with Windows XP, which Microsoft released about a month after I uploaded the button.

<Figure
  src={aquaButton}
  alt="A small Windows form titled AquaButton with two rounded, glossy buttons labelled AquaButton, the top one white and the bottom one blue"
  caption="My attempt at recreating a Mac OS X Aqua button in Visual Basic 6."
  small
/>

## Looking at the code again

The implementation is quite straightforward, although I probably thought it was rather clever back then.

I used six images, three for the normal state and another three for the pressed state. Each set had a left edge, a stretchable middle section and a right edge. This allowed the button to be resized horizontally without distorting its rounded ends.

A transparent label sat on top to display the caption and handle mouse events. When the user pressed the button, the `MouseDown` event switched to the blue images. `MouseUp` switched them back.

That was pretty much it. I wasn't drawing anything in code, and the whole effect came from swapping images.

I wrapped everything in a VB6 UserControl and exposed properties such as `Caption`, `Font` and `ForeColor`, so other developers could use it in their own applications.

A few things stand out when I read the source now. The `Enabled` property stores a value but doesn't actually disable anything. It even defaults to `False`, so every new button claims to be disabled and works anyway. There's a `Refresh()` method that's completely empty. I also named the image controls `Image3`, `Image4`, `Image5` and so on, which makes following the code unnecessarily difficult.

The resizing logic also forces the control to a fixed height of 450 twips. Apparently, I was happy to let people change the width but not the height.

## The original README

There's also a file called `ReadMeMeMe.txt`, which I apparently thought was a perfectly reasonable filename.

Reading it now is probably more embarrassing than the code itself. I was rather enthusiastic about Apple's interface and wrote about how I hadn't seen any Mac OS X-inspired controls on Planet Source Code yet.

I even mentioned that this would be the first control in an "Aqua Control Suite" I was planning to build.

Then there's the known bugs section:

> Caption seem to be having some problem .... you'll know the problem :)

That was the entire bug report, followed by a note saying I was still trying to fix it.

I uploaded the project anyway.

Bear in mind this was 2001. Uploading meant zipping up the project and submitting it through the site. Version control did exist, CVS and Microsoft's own Visual SourceSafe among them, but Git wasn't around yet. Linus Torvalds wrote it in 2005, and GitHub came along in 2008.

According to the archived listing, it ended up with a rating of 4.6 from 14 users, which isn't too bad for a button with a known caption problem.

## Twenty-five years later

It's strange seeing code I wrote that long ago. I've worked with quite a few languages and frameworks since then, and obviously wouldn't build a button this way today.

My interest in how interfaces are put together hasn't changed much, though. Back then, I saw something on a Mac that I couldn't get on Windows, so I tried to reproduce it with the tools I knew. The result wasn't particularly sophisticated, but I learnt quite a bit from trying to make it work.

I still do a fair amount of that today, just with different tools and considerably less image swapping.

The [original project is on GitHub](https://github.com/Planet-Source-Code/janarayson-aqua-button__1-27408) if you're curious. All the source files are there, including the README and the empty `Refresh()` method.
