Contents
TClock Help  ver.2.2.8

TClock can make you to customize system tray clock on Windows95/98/NT4.0 Taskbar.

• Getting Started

• Context menu

• TClock Properites

• Color and Font

• Format

• Alarm

• Mouse

• Taskbar

• Customize Start button

• Customize Start menu

• Misc

• Synchronize

• Misc

• Update Desktop Calendar automatically

• Timer

• Programming

• Notes

• About TClock

E-mail: kazuto.sato@nifty.ne.jp

WWW: http://member.nifty.ne.jp/kazubon/


Getting Started

Notes

Requirements

Microsoft Windows95, 98, or Windows NT4.0.

Install

Place TClock.exe, TCDLL.dll, TClock.hlp into same folder.

If you are using an old version of TClock, exit it before copying.

Uninstall

Exit TClock and remove copied files. If you mind, remove registry key as shown below.

Launch and Exit

Launch TClock.exe, and then if you find clock text as date, day of the week, and time on system tray of Taskbar, it is running properly.

To exit, point and click right mouse button on Taskbar clock, and then select "exit TClock" in context menu. Taskbar clock back to original status.

TClock modify neither registry nor any other Windows setting to customize Taskbar. TClock only customize Taskbar while running.

Notice at installation

Before using TClock, You have to check "Show Clock" in "Taskbar Properties" in advance.

Startup

To launch TClock every time Windows startup, create shortcut to TClock.exe in "Startup" folder in Start menu.

You can create shortcut automatically by pressing "Create a shortcut in Startup folder" button of "TClock Properties" in "Misc" page.

Registry

TClock keeps user setting in registry under the following key:

HKEY_CURRENT_USER\Software\Kazubon\TClock

Optional Command-Line Switches

The TClock has following command-line switches:

/prop	Display TClock properties
/exit	Exit TClock


Notes

If trouble occur frequently while TClock is running, you should stop using TClock. It may cannot run properly in case of circumstance of machine (it seems there are more machines which can work well than the author expected).

TClock is not recommended for who take priority of system stability.

The author is not liable for any damages you may encounter by using TClock on your machine.

By the way, if error occur to TClock, it cause error to "Explorer".


Context menu

If you right-click the Taskbar clock, you will find the following menu.

Adjust Date

Opens the "Adjust Date/Time" dialog of Windows.

Cascade ... Minimize All Windows

Same as the context menu of the original Taskbar clock. While the "Undo" item appears in the original, it does not exist in the TClock menu.

Task Manager

In case of Windows NT 4.0, "Task Manager" item is added under "Minimize All Windows". It launches the Task Manager of Windows NT.

Taskbar Properties

Opens the "Taskbar Properties" dialog of Windows.

Timer

Opens the Timer Property dialog.

Synchronize

Appears after you set up time synchronization on the "Synchronize" tab in the TClock Propoties dialog from the context menu.  If you choose this option, TClock connects the specified server and adjusts the time.

TClock Properties

Opens the TClock Properties dialog.

TClock Help

Opens the TClock Help file (TClock.hlp).

Exit TClock

Exits TClock and returns the Taskbar clock to the original status.

Toolbar

While using TClock, the "Toolbar" option does not appear in the context menu.


TClock Properties

If you select "TClock Properties" in context menu, setting dialog appears. Set property in each property sheet page, then press "OK" or "Apply" button to apply setting to Taskbar clock.

• Color and Font

• Format

• Alarm

• Mouse

• Taskbar

• Customize Start button

• Hide Start button

• Customize Start menu

• Synchronize

• Misc

• Update Desktop Calender Automatically


Color and Font

You can change background color, text color, and font of Taskbar clock.

Background, Text

You can select from 20 colors included "Button Face" "Button Shadow" "Button Highlight" "Button Text", besides basic 16 colors of Windows. Colors of "Button foobar" colors depend on circumstance of user.

If display color pallete is High Color or above, you can select color freely by pressing [image] button next to each selection box.

Font

Select display font from font list installed in system.

Size

Set font size of clock text. Unit is point.

Bold, Italic

If "Bold" is checked, clock text turn into bold style. If "Italic" is checked, clock text turn into italic style.

Adjustment

Though TClock calculate size of clock and position of text automatically, if its appearance is odd, adjust it by using "Clock height", "Clock width", "Text position" and "Line height".


Format

You can define date and time format of Taskbar clock.

Locale

Select locale to apply notation of month name, weekday name, date/time order, etc.

Year

If checked, year without century appears.

Month

If checked, abbreviated month name appears. This follows selection of "Locale".

Month (digit), Date, Hour, Minute, Second

If checked, each section appears.

Day

If checked, day of week appears. This follows selection of "Locale".

CR

If checked, carriage return character is added before time. It is recommended for who dock Taskbar vertically.

Internet Time

If checked, "Internet Time" proposed by Swatch appears. Unit is called "beat".

 Swatch Site

Special thanks to Manabu Takemura for his modified source code, which helped me to display Internet Time.

12H

If checked, display of hour turns into 12-hour format. If not, display of hour is 24-hour format.

AM/PM

If checked, AM/PM indicator appears.

more

To modify several more settings, press this button.

AM / PM Symbol

You can select notation of AM/PM indicator. You can also define them freely by typing literal text into each field.

Show 0:xx at 12:xx

If checked, display of 12AM/PM turns into "0".

Customize Format

You can define display format freely. Following descriptor characters are supported.

TClock Format

yyyy	Year with century
yy	Year without century
mm	Month number (e.g. January -> 01)
m	Month number, no leading zero (e.g. January -> 1, Decenber -> 12)
mmmm	Full month name, follows selection of "Locale"
mmm	Abbreviated month name, follows selection of "Locale"
dd	Day of month
d	Day of month, no leading zero
dddd	Full weekday name, follows selection of "Locale"
aaaa	Same as dddd
ddd	Abbreviated weekday name, follows selection of "Locale"
aaa	Same as ddd
hh	Hour
h	Hour, no leading zero
nn	Minute
n	Minute, no leading zero
ss	Second
s	Second, no leading zero
tt	AM/PM indicator, follows setting of "AM Symbol" or "PM Symbol"
/	Date separator, follows selection of "Locale"
:	Time separator, follows selection of "Locale"
\n	Carriage return
LDATE	Show long-formatted date. Depends on "Region" setting in the control panel.
DATE	Show short-formatted date. Depends on "Region" setting in the control panel.
TIME	Show time. Depends on "Region" setting in the control panel.
Y	Year by the locale calendar (e.g. the year of the Emperor in Japan)
g	Period/era name by the locale calendar (e.g. "Heisei" in Japan)
@@@	Swatch Internet Time
@@@.@	Swatch Internet Time to the 1st decical place
"..."	Display literal text surrounded by double quotation marks

Following characters are left for compatibility with previous version.

mme	Abbreviated month name in English
dde	Abbreviated weekday name in English
AMPM	AM/PM indicator, follows setting of "AM Symbol" or "PM Symbol"
AM/PM	AM in the morning, PM in the afternoon
am/pm	am in the morning, pm in the afternoon


Alarm

Set alarm

To play sound at the time you wish, check "Activate Alarm", set "Time" below, then select WAVE at "File".

Day

Open dialog box for alarm setting.

12H

Ring alarm in same hour of AM/PM.

Repeat

Repeat playing WAVE.

Blink

Blink clock text at set time.

Set plural alarm

To set plural alarm, select "(Add)" from [image]. To erase added alarm setting, press [image] button.

Set time signal

If "Play sound every hour" is checked, play WAVE selected at "File" every hour.

Repeat

Repeat playing WAVE 1 time at 1 o'clock, 12 times at 12 o'clock. Repeat of time signal always follow 12-hour format. That is, repeats are 11 times if it is 23 o'clock.

Blink

Blink for one minute every hour.

Tips:

• To stop playing WAVE or blinking, click on Taskbar clock. This apply both alarm and time signal.

• Since TClock load WAVE all at once in memory, you should not select huge file.

• If you have problem playing WAVE, check "Play WAVE by using MCI" in "Misc" page.

• If you leave "File" blank and check "Blink", you can use alarm or time signal without playing sound.

Supported file format

You can select file from following format to use for alarm and time signal besides WAVE:

• Multimedia file (e.g. .MID, .AVI)

• Music CD (input "cdaudio" at "File")

• Document file, Application

• URL (e.g. http://...)


Mouse

You can choose how TClock acts when you click the Taskbar clock or youdrop file(s) onto it.

Drop files

Specifies what is done when you drop file(s) onto the clock display.

If you choose "Recycle Bin", the file(s) are moved to Recycle Bin.

If "Open with...", opend with a prespecified application. To select it, press [image] button.

Left button

For a prespecified action, you can choose either single click or doubleclick with the left button on the clock display.

The actions you can choose are as follows.

Date/Time Properties	Opens "Date/Time Properties" of Windows.
Shut Down Windows	Same as "Shut Down..." in the Start Menu.
Run Program	Same as "Run..." in the Start Menu.
Minimize All Windows	Same as &quot;Minimize All Windows&quot; in the Context Menu of TClock.
Synchronize	Synchronizes the time with a prespecified server if you complete the settings on "Synchronize" tab in the TClock properties.
Timer	Opens the "Timer" dialog of TClock.
Copy to Clipboard	Copy selected date and time to clipboard. See "TClock Format" for available format.
Open File	To use "Open File", press [image] button and choose the file which you open. You can designate a URL such as "http://..." and "mailto:..." (if a Web browser is installed).
The default option is "Date/Time Properties".

If you choose both "Hide Start button" and "Start menu from Clock" in the "Taskbar" tab, the "Left button" settings are of no use.

Tip: To open My Computer, Disk Drive or Control Panel with the left click, create its shortcut and choose it.

Tooltip

Format the tooltip, which appears when the cursor is on the clock. See "TClock Format" for available format.


Timer

Timer is function to play sound or open file after set time (by minute).

If you select "Timer" from context menu, "Timer" dialog appears.

Name

Name easily recognizable for using timer.

Minute

Set how minutes remain to play or open file.

File

Select file to play or open at set time (by minute). Following file format is supported:

• Sound (WAVE file)

• Multimedia file (e.g. .MID, .AVI)

• Music CD (input "cdaudio")

• Document file, Application

• URL (e.g. http://...)

Repeat

Repeat playing if selected files is Sound or Multimedia file.

Blink

Blink clock after set time (by minute) elapsed. You can also select "Blink" without designating any file.

Start

Start Timer by pressing "Start" button. In context menu of Taskbar clock, Timer name and remained time is shown. To stop Timer, click on Name in menu.

Once started, Timer setting is recorded. You can reuse Timer setting next time by selecting item from "Name". To remove record, press [image] button.

Notice

You cannot expect exactitude of seconds.


Taskbar

You can select following functions on this page.

• Customize Start button

• Customize Start menu

• Other


Customize Start button

You can customize appearance of icon and caption of "Start" button on Taskbar, when "Customize Start button" is checked.

Change Bitmap

To change icon, prepare bitmap sized about 16 pixel hight, suitable width, then select file by pressing [image] button.

(Use included NIKO.BMP to try out)

You can also designate icon file (.ico), executable file (.exe,.dll) for icon. If you select executable file, "Select Icon" dialog appears.

SHELL32.DLL and COOL.DLL (attached to Plus!) in SYSTEM folder contain many icon resources. To display default Windows flag icon, select USER.EXE in SYSTEM folder.

Change text

To change caption, type literal text into "Caption".

About bitmap for icon

• If display color pallete is 256 colors, look of bitmap is odd when designated bitmap is used 256 colors or more. If display color pallete is High Color or above, bitmap used 256 colors or more is displayed correctly.

• Color of pixel at the bottom left corner of bitmap is used as transparent color (surface color of button). Though this is valid when bitmap is used 256 colors or less.

• You cannot use RLE compressed file.

Recommended bitmap colors is 16 if display color pallete is 256 colors, 256 if display color pallete is High Color or above.

Tip:

To change color and font of caption, create bitmap include icon and caption and designate it, with leaving "Caption" blank.

Example when designating icon and caption:

Example when designating icon, leaving caption blank:

Example when designating wide bitmap, leaving caption blank:


Hide Start button

Misc - Taskbar

Hide Start button

Hides the Start Button on the Taskbar.

Start menu from Clock

Shows the Start Menu when you click the Taskbar clock. In this case, the settings of "Left button" on "Mouse" tab are of no use.

Flat Start button

Makes the Start Button flat like toolbar buttons of Internet Explorer.

Flat Task switch

Task switching buttons on task bar becomes 2D when "Flat Task Switch" is checked. IE4 or higher must be installed to enable this option.


Customize Start menu

You can customize appearance of image and color of "Windows95" part of Start menu, when "Customize Start menu" is checked.

Note

To enable this function, you have to clear check "Show small icons in Start menu" in "Taskbar Properties".

To change bitmap, prepare bitmap sized 21 pixel width (mandatory), appropriate height, then select file by pressing [image] button.

Color

To designate color above bitmap part, use "Color Selection". You can select color from basic 16 colors of Windows. If display color palette is High Color or above, you can select color freely by pressing [image] button.

To try out, designate bitmap (attached) WIN95.BMP, and designate color blue .

Tile

If checked, bitmap is tiled from bottom left corner of Start menu, same as tiled display of wallpaper of Windows. In this case, size of bitmap is not limited.

About bitmap for Start menu

• If display color palette is 256 colors, look of bitmap is odd when designated bitmap is used 256 colors or more. If display color palette is High Color or above, bitmap used 256 colors or more is displayed correctly.

• You cannot use RLE compressed file.

If display color palette is 256 colors or below, you might use 16 colors bitmap, and if display color palette is High Color or above, you can use 256 colors bitmap.


Synchronize

Time Synchronization

TClock can automatically adjust your computer's time and date by talking to an NTP Server on the Internet using SNTP Protocol.

Server

Specify the NTP Server. There are publicly available NTP Servers out there, like clock.nc.fukuoka-u.ac.jp.

Useful links)

 Public NTP Time Servers (list of public NTP Servers)

 Network Time Distribution Service (University of Fukuoka)

 Adjust Now

If you click this button, TClock adjusts the time right away.

Adjust Regularly

Specify how frequently you want to adjust the time.

Once A Day

Adjusts the time as the day turns.

Interval

Adjusts the time in every specified minutes.

While Dial-Upping Only

Adjusts only while the dial-up connection is active. Uncheck this if you have a permanent Internet connection.

Timeout

Specify the timeout amount. When TClock tries to connect the server and the server doesn't respond in this amount of time, the adjustment will not be made.

SNTP Logging

The communication from/to the NTP server will be recorded in the text file named SNTP.txt in the same folder where TClock.exe resides.

Sound

Specify the sound file that TClock opens when the adjustment is successfully done.

Activity Logging

In this textbox, TClock shows all the activity since started.

Examples)

03/13 22:07:39 failed to get IP address

->Failed to obtain the IP address of the server. Most likely you are not on the Internet or the name of the server is wrong(mis-spelled).

03/14 03:00:34 synchronized +00:01.751 (0332)

->Succeeded. 1.751 second adjusted. It took 0.332 seconds.

03/14 04:04:40 timeout (3040)

->Timed out.

Note

You may not be able to use this functionality when you are accessing the Internet from the Firewall-protected network. Sorry, there's no workaround.

Thanks

The portion of this program that communicates with an NTP Server is derived from the source code made public by Tomoaki Nakashima on his web site. I would like to thank Mr. Nakashima.

 Mr. Nakashima's web site


Misc

Do not customize clock

If checked, you can use "Alarm", "Font" and "Misc" feature without changing "Color and Font" or "Format", and remain appearance of clock.

Play WAVE by using MCI

If you have problem playing WAVE at alarm/time signal, try checking "Play WAVE by using MCI".

Start customize after ... seconds

Set interval between launching and activating of TClock.exe. If you have problem launching from "Startup" of Windows, shift timing appropriately.

Update Desktop Calendar Automatically

Launch Desktop Calendar automatically when date, wallpaper, or display color pallete is changed.

Create a shortcut in Startup folder

Create shortcut into "Startup" of Start menu in order to launch TClock to startup Windows.

Though you should confirm whether TClock run properly on circumstance of user in advance.


Update Desktop Calendar Automatically

Desktop Calendar is freeware utility authored by Shinonon, for displaying calendar on desktop. You can get the latest version from following Web page.

 http://www.din.or.jp/~ashinoda/

Note:

There is no other edition of Desktop Calendar than Japanese. It probably be hard to use this except on Japanese Windows.

Update Desktop Calendar Automatically

If checked, TClock launch Desktop Calendar automatically to redisplay calendar when date, wallpaper, or display color pallete is changed.

If Desktop Calendar you use is previous than ver1.33, select Deskcal.exe by pressing [image] button. If newer than ver1.33, you do not have to touch "Command".

Start only when date change

If checked, Desktop Calendar is not launched whenever wallpaper or display color pallete is changed. Check in case you are annoyed by launching Desktop Calendar when you launch game or screen saver.

Start after suspend

Check in case Desktop Calendar fails to redisplay when resume from suspend in using notebook PC.

Force to start

Check in case Desktop Calendar is not launched even wallpaper changer change wallpaper on Windows NT. However, this feature make side effect that launch Desktop Calendar when none to do with launch timing. On the other hand, Desktop Calendar sometimes refuse to launch even checked, according to sort of wallpaper changer.

Watch wallpaper

TClock will check the wallpaper every minute and open Desktop Calendar when the wallpaper has been changed. Enable this option if Desktop Calendar is not updated automatically when using with a wallpaper changer software, or IE 5 is installed and Desktop Calendar is not updated when wallpaper is changed on display property.


Programming

Developed environment is Visual C++ Ver5.0.

Appended EXESRC.LZH is source archive of TClock.exe, DLLSRC.LZH is one of TCDLL.dll. Entire code is written by C. C++ is not used.

Overview of customizing clock is as follows:

• Call function inside TCDLL.dll from TClock.exe, then install "hook" inside TCDLL.dll.

• Subclassify clock window (class name "TrayClockWClass") in hook procedure.

• When customize "Start"button, subclassify Start button (class name"button") and Task button (class name"MSTaskSwWClass").

• When customize Start menu, subclassify Taskbar (class name"Shell_TrayWnd").

• Hack with each subclassified window procedure.

• Property sheet dialog and playing WAVE program is inside TClock.exe.

Copying or modifying source code, and including it into other program is permitted without any restriction.

In addition, please inform the author if you find some mistake in program.

Source files attached to TClock can be compiled by Microsoft Visual C++. Though specific class libraries is not used, it is unclear whether these can be compiled by other than Visual C++.

Prepare files of icon and cursor by yourself to compile resource.

TClockE.mak is makefile for TClock.exe, and TCDLL.mak is one for TCDLL.dll.


About TClock

TClock is Freeware. Redistribution is permitted without any restriction.

• Media for redistribution (magazine, book, CD-ROM, WWW, BBS, etc.) is not restricted, no matter whether commercial or non-commercial. And, you do not have to ask for permission.

• Redistribution with modification of content of archive is permitted. Redistribution with creating self-extracting archive, or containing image of your own are also permitted.

• Redistribution with modification of Program file (exe, dll), Document file (txt, hlp, chm) is permitted.

Since almost software author inhibit redistribution as above, you should not misunderstand as "These conditions apply any case because TClock is permitted".

Author's mail address:

kazuto.sato@nifty.ne.jp

The latest release of TClock can always be downloaded from the author's homepage:

http://member.nifty.ne.jp/kazubon/.

About Mail

hmm...


About Mail

Though sending mail would be appreciated, the author is so lazy, that it would not always to send reply.

Bugs, Errors, Problems, or "properly worked" report

Though i intend to take measure against the problem as possible as i can, I should you to understand that there would be some cases that cannot make out even to the author. In case of sending report, you should inform machine type (particularly, whether notebook PC or not), OS (95/98/NT), resident application, using MSIE4.x, etc. CPU, memory capacity, etc. are not seemed something to do. Informing display setting (horizontal/vertical, color pallete etc.) in addition would be, if not directly be concerned with TClock, helpful for the author in programming.

Demand for enhancement

I would accept if have interesting and easily realizable ideas. There are what is seemed easy to do but difficult in fact, and what is seemed hard but simple in fact.

Reproductions and Introduction by WWW, BBS, etc.

Though you do not have to ask for, it would be grateful to inform later.

Magazines and books

Introducing without asking permission to the author, or including with CD-ROM is not restricted.

Mail to say thanks

Though usually do not reply, it would be appreciated for the author.


hmm...

TClock is neither "useful" nor "practical" software. This software is to play with Windows environment. Devoting author's all knowledge of Windows programming to author stupid software, it is the purpose of developing TClock. It seems that this software for pleasing become to be really pleased, and then this situation is joyful for me as the author.

However, I intend to develop properties dialog and help files elaborately as possible as i can. On the actual work, I have take time rather than "customize" part, which is essential of TClock.

On further enhance, I should not go in the "useful" direction. I would firmly go in the "funny" direction, but it is not easy to output new idea....