All The Time for Windows v3.51



Please note: As of early 2003, All the Time hadn't been updated at all in at least five years, and hadn't been worked on much for two or three years before that. It was quite the fun little gizmo back in its day, but if you need support, there's not much we can do to help at this point beyond maintaining the documentation here. Thanks for looking at it!

INTRO

All the Time for Windows is a customizable clock. In addition to the current time and the date, memory, disk and system resource levels can be monitored if desired, as well as printer activity. A pop-up calendar and task-switching menu may also be displayed. A glowing Orb can be used to check your system's status at a glance.

All the Time requires VBRUN300.DLL (available in the Visual Basic-Win library of the MSBasic forum on CompuServe) and WIN 3.1 (Win95 for ATT 3.51). It also requires four other .DLL files (included) and the Visual Basic custom control files CMDIALOG.VBX, MSCOMM.VBX, PICCLIP.VBX, THREED.VBX and XLIST.VBX. All the Time is available in two different archives:

Versions for large hard drives

Well, huh, six different archives if you count the fact that I'm leaving the previous versions out here for folks to grab in case they run into problems with the new one. The following are the ones to grab if you're running Windows 3.1:

Versions if large hard drive support isn't necessary, or if you're running Windows 3.1

All the Time is free, and in the public domain.

FILES

ATT.EXE
the All the Time program

Visual Basic source code

ATT.MAK
VB project file
ADVSETTI.FRM
advanced settings form
ALERTS.FRM
low memory/resources warnings form
ALLTHETIM.FRM
the main All the Time form (the clock itself)
ATOMIC.FRM
"atomic clock" communications form
ATTSET.FRM
the settings form
ATTABOUT.FRM
the about box
CAPTION.FRM
pop-up labels for moon and tree icons
CHIMES.FRM
the chimes form
MOONLIST.FRM
moon phase list
SETTIME.FRM
form to set the date/time
LOCATION.FRM
form to set location for sunrise calc
RISESET.BAS
sunrise/sunset calculation
ATTMAIN.BAS
the Main loop
ATTUTIL.BAS
subroutines
MOON.BAS
moon phases subroutine
QS.BAS
quicksort
ATT4WAY2.ICO
the program icon

Custom controls

CMDIALOG.VBX
MSCOMM.VBX
PICCLIP.VBX
THREED.VBX
XLIST.VBX

Support files

DISKINFO.DLL
disk information (freeware by Ian Taylor)
CTL3D.DLL
MS DLL to add 3D effect to common dialogs
ATTSUPP.DLL
ATT support routines
CALL32.DLL
freeware by Peter Golde to use WIN32 routines from VB3.
CITIES.TXT
latitudes and longitudes of some cities

Chimes

BIGBEN.WAV
CHIME.WAV
CUCKOO.WAV
HOURLY.WAV
MULTI.WAV

INSTALL/STARTUP

Copy ATT.EXE to your hard drive and, if you'd like, create a Program Item for it with the Program Manager. Or, simply Run ATT.EXE from the Program Manager's File menu.

VBRUN300.DLL, DISKINFO.DLL, CTL3D.DLL, ATTSUPP.DLL, CALL32.DLL, CMDIALOG.VBX, PICCLIP.VBX. MSCOMM.VBX, THREED.VBX and XLIST.VBX must all be in your Windows system directory to run All the Time.

VBRUN300.DLL is available in the Visual Basic-Win library of the MSBasic forum on CompuServe. The DISKINFO, CTL3D, CALL32 and ATTSUPP DLLs are included in both the ATT34.ZIP and ATTALL34.ZIP archives. The VBX files are available as part of ATTALL34.ZIP, or as part of the Visual Basic Programming System for Windows Professional Edition.

OPERATION

Double-click the All the Time program icon. Once the clock is displayed, double-click on the date to display a pop-up calendar, or double-click on any other portion of the text to change the All the Time settings.

Settings screen

All the Time can display any combination of the following nine items, which can be turned on and off via the Settings screen:

Preset formats for the date and time can be selected from pull- down lists, or you can customize them by typing in Visual Basic's date and time format codes. A more detailed explanation of those format codes follows these instructions.

You can set your system's time and date by clicking the "Set Time..." button and specifying the date and time in the window that's displayed. Or, if you have a modem, you can click on the "Atomic Clock" icon and call a computerized clock in Colorado.

You can specify your location for the calculation of sunrise and sunset by clicking the "Location" button.

The Settings screen also allows you to change the position of the clock, to determine whether its window stays in front of other windows, and to customize the colour and display font. Adjust the spacing between displayed items by moving the "Spacing" slider. Check the "W-i-d-e" box if you want the display bar to be the full width of your screen. The order in which information is displayed can be changed by dragging the boxes at the top of the Settings screen.

If you have a sound card, you can select different WAV files to be played on the quarter hour, and specify whether or not to "ring" a chime every hour - one chime at 1:00, two at 2:00, etc. (dubbed "Multi-Ding(R)" in a fit of marketing-induced perversity).

All the Time's clock can be dragged manually around the screen, if necessary. It can be returned to a corner position via the Settings screen or the Rotate hotkey. Select the center dot on the Settings screen to return the clock to your most recent custom position.

Additionally, there are three hotkeys in All the Time: [Alt]+[Ctrl]+R rotates the position of the clock from corner to corner clockwise around the screen; and [Alt]+[Ctrl]+T toggles whether the clock is displayed or hidden. The third hotkey, [Alt]+=, pulls down the All the Time menu. These keys can be reassigned if they conflict with hotkeys in your other programs.

Alerts

Use the alerts Orb to quickly check for low memory, low resources, or low disk space situations. If values dip below a warning threshold that you specify on the Alerts screen, the green Orb turns yellow; below an "alert" level it goes to red. Click on the Orb to identify the problem.

Printing status

Monitor print activity via the printer icon, which darkens when something is being printed. Double-click on this icon to open the Print Manager window.

Pop-up calendar

Check a reasonably perpetual calendar by double-clicking on the date. You can view the calendar for any month in any year from 1753 to 2078 by adjusting the year slider on the right and the month slider on the bottom, or by clicking on the different month buttons. Click on the little info balloon in the right-hand corner to find out just who's responsible for this little gem.

Task-switching menu

The task-switching menu (displayed as a "+") allows you to select from a list of running programs, access the Settings screen, or exit All the Time.

Sun and moon and tree

Moon phase, season, and general time of day can be determined from the moon phase and tree icons, either by peering at them directly, or by clicking on them to display pop- up labels. Double-clicking on the moon icon displays a table of the phases of the moon. Double-clicking on the tree displays a table of sunrise and sunset times.

Advanced settings

If your favorite program suddenly becomes slow as molasses when you run All the Time, you can fiddle with the numbers on the Advanced Settings screen (access this by clicking the "More..." button on the regular Settings screen).

All the Time does a fair amount of calculating each time it goes to update the display, which can bog down a slow machine. If you don't want the clock to update every second, change the number in the "Update display every x-ity seconds" box.

If you suspect All the Time is rudely stealing more of your processor's attention than is its due, increase the number in the "Give control to Windows x-ity times before next update check" box. This effectively puts All the Time further in the background, from the point of view of your processor. A large number here may cause All the Time to wait longer than the number of seconds you specified in the first box before updating the display, as this setting takes precedence over the other.

Gauges

All the Time includes a stopwatch and a resource- measurement tool (represented by a thermometer). These can be used to keep track of elapsed time, and memory/resource usage.

Turn the gauge display on and off by selecting "Gauges" from the '+' menu. To start and stop the stopwatch without resetting it, click on it with the left mouse button. To reset the stopwatch, click on it with the right mouse button.

The resource/memory thermometer measures the change in the amount of system resources and memory available. Start, stop and reset the thermometer the same way as the stopwatch, by clicking on it with the left and right mouse buttons.

There is also a Reset Gauges menu item when the gauge display is turned on. You can reset both the stopwatch and the resource/memory thermometer at once by selecting this menu item.

DATE/TIME FORMATS

Dates and times are displayed according to the rules that Visual Basic uses to format dates and times, using the format expressions specified on the Settings screen.

Here are the rules, as excerpted from the MicroSoft Visual Basic Language Reference:

To format dates and times, you can use either the commonly used formats that have been predefined in Visual Basic or create user-defined time formats using standard characters that have special meaning when used in a format expression.

The following table shows the predefined data format names you can use and the meaning of each:

Format Name
Description

General Date
Display a date and/or time. For real numbers, display a date and time. (e.g. 4/3/93 05:34 PM); If there is no fractional part, display only a date (e.g. 4/3/93); if there is no integer part, display time only (e.g. 05:34 PM).

Long Date
Display a Long Date, as defined in the International section of the Control Panel.

Medium Date
Display a date in the same form as the Short Date, as defined in the International section of the Control Panel, except spell out the month abbreviation.

Short Date
Display a Short Date, as defined in the International section of the Control Panel.

Long Time
Display a Long Time, as defined in the International section of the Control Panel. Long Time includes hours, minutes, seconds.

Medium Time
Display time in 12-hour format using hours and minutes and the AM/PM designator.

Short Time
Display a time using the 24-hour format (e.g. 17:45)

The following table shows the characters you can use to create user-defined date/time formats and the meaning of each:

Character
Meaning

c
Display the date as ddddd and display the time as t t t t t, in that order. Only date information is displayed if there is no fractional part to the date serial number; only time information is displayed if there is no integer portion.

d
Display the day as a number without a leading zero (1-31).

dd
Display the day as a number with a leading zero (01-31).

ddd
Display the day as an abbreviation (Sun-Sat).

dddd
Display the day as a full name (Sunday-Saturday).

ddddd
Display a date serial number as a complete date (including day, month, and year) formatted according to the Short Date setting in the International section of the Windows Control Panel. The default Short Date format is m/d/yy.

dddddd
Display a date serial number as a complete date (including day, month, and year) formatted according to the Long Date setting in the International section of the Control Panel. The default Long Date format is mmmm dd, yyyy.

w
Display the day of the week as a number (1 for Sunday through 7 for Saturday.)

ww
Display the week of the year as a number (1-53).

m
Display the month as a number without a leading zero (1-12). If m immediately follows h or hh, the minute rather than the month is displayed.

mm
Display the month as a number with a leading zero (01-12). If m immediately follows h or hh, the minute rather than the month is displayed.

mmm
Display the month as an abbreviation (Jan-Dec).

mmmm
Display the month as a full month name (January-December).

q
Display the quarter of the year as a number (1-4).

y
Display the day of the year as a number (1-366).

yy
Display the year as a two-digit number (00-99).

yyyy
Display the year as a four-digit number (100-9999).

h
Display the hour as a number without leading zeros (0-23).

hh
Display the hour as a number with leading zeros (00-23).

n
Display the minute as a number without leading zeros (0-59).

nn
Display the minute as a number with leading zeros (00-59).

s
Display the second as a number without leading zeros (0-59).

ss
Display the second as a number with leading zeros (00-59).

ttttt
Display a time serial number as a complete time (including hour, minute, and second) formatted using the time separator defined by the Time Format in the International section of the Control Panel. A leading zero is displayed if the Leading Zero option is selected and the time is before 10:00 A.M. or P.M. The default time format is h:mm:ss.

AM/PM
Use the 12-hour clock and display an uppercase AM with any hour before noon; display an uppercase PM with any hour between noon and 11:59 PM.

am/pm
Use the 12-hour clock and display a lowercase AM with any hour before noon; display a lowercase PM with any hour between noon and 11:59 PM.

A/P
Use the 12-hour clock and display an uppercase A with any hour before noon; display an uppercase P with any hour between noon and 11:59 PM.

a/p
Use the 12-hour clock and display a lowercase A with any hour before noon; display a lowercase P with any hour between noon and 11:59 PM.

AMPM
Use the 12-hour clock and display the contents of the 1159 string (s1159) in the WIN.INI file with any hour before noon; display the contents of the 2359 string (s2359) with any hour between noon and 11:59 PM. AMPM can be either uppercase or lowercase, but the case of the string displayed matches the string as it exists in the WIN.INI file. The default format is AM/PM.

:
Time separator.

The time separator separates hours, minutes, and seconds when time values are formatted. The actual character used as the time separator depends on the Time Format specified in the International section of the Control Panel.

/
Date separator.

The date separator separates the day, month, and year when date values are formatted. The actual character used as the date separator in the formatted output depends on Date format specified in the International section of the Control Panel.

The following are examples of user-defined date and time formats:

Format
Display

m/d/yy
12/7/58

d-mmmm-yy
7-December-58

d mmmm
7 December

mmmm yy
December 58

hh:mm AM/PM
08:50 PM

h:mm:ss a/p
8:50:35 p

h:mm
20:50

h:mm:ss
20:50:35

m/d/yy h:mm
12/7/58 20:50

TIPS TO COMBAT ADVANCED CASES OF ENNUI:

Drag the clock slowly across the picture in the Settings window, over a Program Manager window three or four layers back, or around a PROCOMM PLUS window. Wow.

Switch your font to WingDings.

Type words into the Date or Time format box (put quotes around them).

Enter jumbled formats like "d/h/ss" into the Time format box.

Overcome seasonal doldrums by changing your "Latitude" setting back and forth between 'N' and 'S' and watching the tree change.

Make your font really big.

Make your font really big, and use "ss" as your Time format. Show only the time. Remember that you can drag the clock around, even if it covers your entire screen. heh heh.

Download the 1-900-WEATHER guy's voice from MACFF on CIS, convert the sounds to PC format, and choose an inappropriate hourly sound. Save a backward version using Windows' Sound Recorder and set All the Time to "Multi-Ding(R)", then sing along as it chimes the hour. Rwa yaback snay!! Yawbg! Or try slowing down the Road-Runner[tm] sound a few times for a nice, cow-like >mwah, wah< effect...

VERSION HISTORY

Version 1.1 corrects one major bug in the display of the tree season graphic. In version 1.0, only one Autumn tree was displayed, regardless of the date and time.

Version 1.1 introduced several new features:

Version 2.0 corrects an extremely pesky, intermittent "Out of Stack Space" error.

Version 2.0 also introduces a few more features:

Version 2.1 fixes various bugs and incompatibilities, and gives the user more control over update timing and priorities:

Version 3.0 was recompiled with VB 3.0. Added a table of moon phases that can be displayed by double-clicking on the moon icon. Added a stopwatch/resource-measuring mode that can be selected with the "Gauges" menu command.

Version 3.01 fixed some incompatibilities with display boards in >256-color modes.

Version 3.03 fixes an "overflow" error that occurred on systems with really big swap files, and calculates the largest free memory block using the Windows GlobalCompact function, rather than the inscrutable MemManInfo function.

Version 3.1 adds a pop-up calendar and support for our palZ in Australia.

Version 3.2 corrects the long-standing but maddeningly intermittent "midnight overflow". (A big tip of the hat to Brad Friedman for pinpointing the exact spot which needed fixing. Perhaps when you're elderly and decrepit, too, Brad, some kindly youngster will prop you up in front of the keyboard and tell ya what to do.) 3.2 also adds support for distinct chimes for the quarter hours, enabling ATT to meet the stringent standards for "Proper British Multi-Ding.". If anybody's got decent grandfatherly-clock-type sounds, please slip em my way...

Version 3.21 fixes a bug which could cause the clock to stop on systems without sound support.

Version 3.22 adds an additional modem initialization string to the "atomic clock" dialing routines and waits after connecting for the output of the atomic clock to stabilize before attempting to set the time.

Version 3.24 improves the error-checking in the comm routines very slightly, and adds a "All local hard drives" option to the "All hard drives" disk-space monitor options -- "All hard drives" made the system run as though it were dipped in goopy if a remote volume became unavailable.

Version 3.25 adds an "unused RAM" option to the memory display options. This option, in conjunction with a new "Compact Memory" menu selection, can be helpful when determining when low physical RAM will lead to excessive disk-swapping. For those who are curious, unused RAM is calculated as the values returned by the Windows MemManInfo function:

(dwFreePages * wPageSize) / 1024
Since discardable memory is not immediately freed by Windows (on the chance that it may be requested again, and to avoid reloading it from disk), this number may not increase as expected upon exiting a program. Because of this, the "Compact Memory" menu option is included. Itcauses ALL discardable blocks to be released from memory, and can be used to get a feel for how much free RAM is actually available. It executes the Windows GlobalCompact (-1) function. If you've read this far, then you may well have some better ideas about how a low-mem "swapping meter" might be implemented. If so, write me!

Version 3.3a adds the alerts Orb to warn when memory, resources, and disk space are low.

3.3b fixes an Overflow bug, without which no new version of ATT would be complete. Thanks upon thanks to Brad for finding it.

3.3c fixes an Overflow bug, without which no new version of ATT would be complete (henceforth. "FAOB, WWNNVOAWBC"). Thanks upon thanks to Brad for finding it (likewise, "TUTTBFFI"). Figures it'd be smack dab in the middle of the most embarrassingly ugly code I've ever written in my life. Sorry you had to see that, Brad. Thanks again.

3.3d properly saves the text legends chosen for the Orb's alerts. TUTTBFFI.

3.3e uses the "Short Date" format to display dates in the moon phases table (para nosotros amigos internacionales). Also fixes a bug that caused a crash when scrolling to the very end of the "perpetual" calendar.

3.3f is a recompile of 3.3e with the proper (5/12/93) MSCOMM.VBX installed.

3.31 eliminates some U.S.-centric oddities in the atomic clock dialing routine. Danke, Herr Scannell, for finding the bug and pin-pointing the exact spot that needed to be fixed!

3.32 eliminates some false alarms when alerts are set for items that are not chosen to be displayed on the clock (e.g., setting an alert for low resources, but not actually displaying resource levels).

3.39 adds sunrise and sunset calculations.

3.39a fixes US-centric assumptions introduced in 3.39. Straightens out, perhaps once and for all, some confusion about which resource measurement represents GDI resources and which represents User resources. Did I dream that the whole issue of limited resources still isn't fixed in Windows 95?

3.39b eliminates sunrise/sunset miscalculations for those not in the Northern and Western hemispheres. Merci, Claude!!

3.39c removes the "Southern Hemisphere" checkbox from the Settings screen; the program uses the value from the Location screen instead. Similarly, the Atomic Clock dialing screen uses values from the Location screen for initial time zone and daylight savings time settings.

Double-clicking on the tree in 3.4 displays a table of sunrise & sunset times.

3.4b fixes a couple of minor bugs. Allows ATT to be killed by another program, e.g. Voodoo / Assassin.

3.4d Makes ATT timer-driven, rather than using that clunky endless loop. Sorry it took me so long.

3.5 Added a colour button.

3.5a Incorporated enhanced bitmaps precision-engineered by ATT's uber-aesthete/superego, C Rogers, and they seem to work well!

3.5b Minor but annoying bug caused the program to abort if the color selection dialog was cancelled.

3.51 Attempts to allow ATT to work with very large (>2.147gig) hard drives. Thanks to Gary Wayner for finding and reporting this bug. Compatibility with Windows 3.1 has been sacrificed. If you're using WIN31, stick with 3.5b.

TO-DOs

The following ideas have been suggested from time to time, and might some day be implemented.

Done!

Not yet

THANKS TO

Jason Boghosian, Andreas Christofides, Ramayana Conrad Davis, Desi DosSantos, Michael Downs, Rick Flynn, David Griffeath, Nathaniel Johnson, Detlef Marxsen, Michael Mayo, Larry McJunkin, Greg Moyle, Steven Oscharoff, Dan Scannell, Lisa Sieverts, Jan Smith, Michael Sperber, Bill Taylor, Stephen Thayer, Jim Tyson, Bob Ulius, Claude Villermain, Joshua Paul Werblin, and Bernard Wright for their bug reports and suggestions, and to Barry Simon for the mention in his Windows Sources column.

Big thanks to Brad Friedman, sysop of the groovin CalamityVille BBS sensation, for his many suggestions, and for designating CalamityVille as ATT's official halfway-house where, for those brave and forward-thinking enough, the most current version of All the Time can always be found.

Many thanks as well to Steve Rosenstein, aol-ias VAXCAT1, for his incredibly detailed and helpful bug reports and suggestions, and for facing south in order to resolve an incompatibility between his perception of the universe and ours, hhh.

Peter Kaminski not only identified the circumstances causing the overflow bug that occurred when using gigantic swap files, but outlined all the programming changes necessary to fix it! Thanks!!

Don Schueler supplied the source code for a way-cool perpetual calendar over in the MSBASIC forum of CompuServe, and told everyone to feel free to use it as they'd like. We did, and we think it's a neat little addition.

The sunrise/sunset calculation routines were taken from an adaptation of an article that appeared in Astronomy magazine, April, 1984. William Bell's original code had been reworked by Chris Spratt and David Birley and uploaded to CompuServe where I found it and sliced it to bits.

The Orb is relegated to mere bullet-point status on a zillion World Wide Web pages, one of which I swiped it from. Thanks to whoever it was who originally drew it -- nice!

Finally, Carole Rogers did her best to keep the program as simple and elegant and bee-yoo-tee-full as possible, while somehow allowing me to make it as weird and complicated as I could. It's out of her hands now, so praise her for everything that's right about the program, and let me know about anything that's wrong. Thanks, Carole.

DISCLAIMERS/FINE PRINT

All the Time is in the public domain, and is free. No warranties, no liabilities, sorry. Visual Basic source code is included for those who like to tinker or plunder. Enjoy.

If you have questions, comments, or are given to spontaneous outbursts of enthusiastic praise, Wilson Smith can be reached at w@xnet2.com; Carole Rogers, who did the original artwork, layout, and program design can be reached at xplex@aol.com.

Wilson Smith (and Carole Rogers)

Last modified on 02-24-03