Cursor Clock
version 1.0.1
by Noah
cursorclock@noah.org

Here's a little program for all you office clock-watchers out there.
This application will turn your mouse cursor into a working clock.


Download
Free software?
How to Install It
How to Uninstall It
How to Use It
About The Source Code
Known Bugs
Updates and Bug Fixes

 


Download

RISKY LICENSE
THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS SOFTWARE.


Download Full Setup
Cursor Clock version 1.0.1

Note that this setup includes the Microsoft VB5 runtime library which is why this setup is over a megabyte. If you have the VB5 runtime already on your system then Cursor Clock will take up less than 50K.

Download this Full Setup version if you don't know what to do.

Download Lightweight Setup
Cursor Clock version 1.0.1

Use this if you know your system has the VB5 runtime installed. This is the same as the heavyweight, full setup, but it does not include the 1.5M VB5 runtime. This setup is half the size and should be much faster to download and kinder to my server.

Download the Full Setup version if you don't know if you have the VB5 runtime.


Download Cursor Clock VB5 Source Code

Free Software?

This software is "Spare-ware". If you can spare it, then please send it to me at:

A.T.S.
ATTENTION: Noah Spurrier
1004 Revere Avenue, Suite B-45
San Francisco, CA 94124

Just reach into your pocket. What'd ya got in there? A five? Some quarters? Lint? Well, separate the pocket change from the crap and send me the cash. Don't even think about it -- just stuff the money into an envelope; write my address on it; and (here's the hard part) stick a stamp on it and mail it today! Checks, money orders, barer bonds, stock certificates, foreign currency, deeds and titles... they are all welcome. Please, keep the lint.

What do you get for you money? Well, you already have the program, and the source code, and the risky license disclaimer... Okay, so you don't get anything. You've already got it all. What can I say? It's a big scam. You get a dorky little clock on your cursor, some crappy source code written by a big-shot programmer, and a warranty worth squat. This software wasn't even developed by a certified ISO9000 organization. It's probably not even Y2K compliant. If you're lucky it will run for a few months until the year 2000. Until then you get to tick-tick-tick away the minutes of your life and be constantly reminded of the time spent in your cubicle wasting away for the boss in the corner office. For all this, I want your lunch money. If every office-worker in the USA went on a fast during one lunch and sent me their money instead then I'd be able to eat lunch for the rest of my life. That would be so cool.

If you can't spare it and you still want to use this software then all I ask is that you distribute this software to as many friends, acquaintances, colleagues, known associates, and strangers as you can. Maybe one of them will come up with some money. I'm not asking for very much! I've gotta work the volume here.

Send your questions and comments by email to cursorclock@noah.org.


How to Install It

Download the Cursor Clock setup program. Save it anywhere. Run the setup. It will extract and install itself. The setup program will ask you where you want to install the software. Normally use the location it will suggest. After the Cursor Clock is installed you can delete the setup program.


How to Uninstall It

Open the Control Panel and click on "Add/Remove Programs". You should find the application listed under "Cursor Clock". Select it then click "Add/Remove...". This will delete all the program files.

Note the following installation Check List (nobody really trusts uninstall software, do they?):


How to Use It

There is not much to using the Cursor Clock. Once it is installed and running you can just leave it alone. There are only two display options: 12-hour or 24-hour clock formats. The default is 12-hour format.

When the Cursor Clock is running its icon will appear on the tray of the taskbar. This lets you know it's active and this gives you a way to access the Cursor Clock menu. To display the Cursor Clock menu just double-click or right-click on the Cursor Clock icon.

taskbar tray taskbar tray popup menu
double-click or right-click on the Cursor Clock icon to display the popup menu

The popup menu is self-explanatory, but just to be pedantic I'll explain the selections anyway:


About The Source Code

This source code is written entirely in Visual Basic 5. Extensive calls are made to the Windows API (user32, gdi32, kernel32, and shell32.dll).

One interesting thing you should notice is that I coded all the bitmap resources in the Basic source code itself. I was trying to cut down on the library dependencies. Coding the bitmaps inline let me avoid the Standard OLE types. Specifically, I was trying to avoid using StdPicture. The bitmaps are small and black and white so they were easy to code manually.

The Cursor Clock applications is made up of the following files.

  1. form_main.frm
    The project uses form_main as the startup object. All the initialization occurs in the Form_Load event. This form creates instances of the CursorClock class and the NotifyIcon class.
  2. form_about.frm
    The About form implements the about dialog box which can be opened from the popup menu. This form displays the license information, contact information, and allows the user to start the default web browser and display the application home page (see the URLShell class).
  3. CursorClock.cls
    The CursorClock class manages the cursor resources, bitmaps, and details of creating cursors from raw bitmaps and modifying the normal system cursor using SetSystemCursor. CursorClock can read the current time and build a new cursor to show the time. This class also contains the bitmap image resources. Normally these resources would be found in a separate resource binary file.
  4. NotifyIcon.cls
    The Notify Icon class registers an icon on the taskbar tray.
  5. URLShell.cls
    The URLShell class opens an URL using the default browser
  6. kernel32_process.bas
    The kernel32_process module defines functions to the kernel32 process and thread API. These functions are used in the Form_Load event of form_main to lower the default process priority of Cursor Clock. A lower process priority lets Cursor Clock be nice to other "more important" applications that may be running. If you write a screen saver, then you usually want to do this. This really isn't necessary for Cursor Clock since it only modifies the cursor every 60 seconds, but I figured it was good in principle. You never know when one little app is going to send a heavily loaded system into swap thrashing.

Known Bugs

Note: If you are using version 1.0 under Windows 95 then you should upgrade to version 1.01.

I am aware of only one minor, harmless bug. It occurs under the following situation:

The bug is that the original animated cursor will not be restored. Instead, a static cursor will be restored that shows a single frame of the animated cursor. This change is not permanent. If the user logs out the animated cursor will be restored when the user logs back in.


Updates and Bug Fixes

There was a Bug in the 1.0 version that caused CursorClock to leak memory only under Windows95. The leak was pretty slow, so you would only notice it if you left your machine on over night. Under WinNT the SetSystemCursor() function will automatically delete the cursor resource after it has been set, but under Win95 it does not. The resource must be deleted manually or a memory leak will result.