The KeysBoard


Overview 
The KeysBoard is a small database system for tracking the keys issued to
personnel.
The visual interface is in two parts. The top section of the screen 
represents a board of labelled pegs or nails on which hang the unissued 
keys of an institution. The bottom section is used to display a selected 
person and a list of the keys currently issued to them. A key is issued or 
returned simply by dragging it from the top section to the bottom or vice 
versa. Facilities are included for adding, deleting and editing keys and 
people, obtaining a list of people to whom a particular key is issued, and 
for re-arranging the order of keys on the board.

Requirements and Installation 
Requires Windows 3.1 or later, VBRUN300.DLL
The files should be unzipped to a single directory. VBRUN300.DLL is 
obtainable from SIMTEL.NET and should be either in the directory concerned 
or in windows\system. The file KEYSBD1B.EXE can then be run.

A walk through
The data files in the kit have a number of existing keys and users. Start 
the program and:
1. Select user `Bury, Peter' from the drop-down box toward the bottom of the 
frame. The user name and information are displayed and the line of blue 
boxes below has the tags of the 5 keys currently issued.
2. Issue him an ABC key by dragging the (blue) ABC tag and dropping the key 
anywhere on the bottom (yellow) frame. The (green) number below ABC, 
which represents the number of keys hanging on that peg, will change from 
2 to 1.
3. Repeat step 2 to issue a second ABC key. The number will change to a red 
zero as a warning to get more keys cut.
4. Try issuing yet another ABC - of course you can't.
5. Return one of the ABC keys by dragging it from the user's (yellow) frame 
and dropping it anywhere on the (brownish) top frame.
6. Double-click the (green) number 1 below the ABC tag. Details of the ABC 
key will be displayed including a list of people issued with this key. 
The boxes are editable and will update the files when this frame is 
closed. Double-click user `Bottle, Blue' on the (green) list of key 
owners to display this user and his keys.
7. Return all his keys to the board. A `Delete this user' button will 
appear. Press it.
8. Find all users with the ABC key and return these keys to the board. When 
you display the properties of the ABC key, a `Delete this key' button 
will be visible.
9. Try creating a new user and a new key.
10.  The order of keys on the board is changed by dragging the (blue) key 
tag and dropping it to a new place to the left or right of any other. The 
hole in the key head is the focus of the pointer and must be dropped onto 
the (brownish) board, not onto a key.
11. When you are ready to create your own users and keys, delete the file 
KEYBOARD.INI. Next time the program is run it will create new empty data 
files.

Options
Edit the line `cols = ` in the file KEYBOARD.INI to the desired number of 
columns to be displayed. The minimum number displayed will always be 10. 
The maximum number is limited by screen resolution. For standard VGA this 
is 13, SVGA at 800x600 gives 16, or 1024 gives up to 21 columns.



File structure
There are three data files, all of which use comma delimited text. 
Quotations are written around text items to preserve any non-text 
characters. If you edit any of these files you are most strongly advised 
against changing any of the pointers or identifiers as this may 
irrecoverably destroy the integrity of the data. For an initial import of 
users, consecutive numbers could be generated followed by user name, 
followed by two commas as placeholders if  the phone number and dept are 
not available. 
KEYMASTR.DAT    One line per key with the following fields:
Integer      Identifier for the key
Text         Label identifier
Integer      The number of spare keys on the board
Text         Description of the key

KEYUSERS.DAT    One line per user with the following fields:
Integer      User identification
Text         User name          50 characters
Text         Phone number       12 characters
Text         Department         10 characters

KEYISSUE.DAT    each line is the issue of a key to a user
Integer      The user identifier
Integer      The key identifier

File security and backing up
There is of course no substitute for regular backup of data files.
However, even if there was a power failure or the program were to crash 
while updating the files there should be no loss of data provided that the 
program is not immediately run again. Each update is done in four stages. 
1. The data is written to a file with the extension of .NEW
2. Any existing file with an extension of .BAK is deleted
3. The current .DAT file is renamed to .BAK
4. The .NEW file is renamed to .DAT
So by examining the size, date and integrity of the files it should be 
possible to find a valid file and set it as the .DAT file. 

Status and distribution.
The KeysBoard program is freeware and may be distributed freely and without 
restriction. All standard disclaimers of non-liability for any conseqence 
of its use apply. Users may register with the author for A$40 which will 
entitle them to:
1. The source code. The user may thus customise the size, names and types of 
data to be saved for each user and/or key
2. A version which uses the Microsoft Jet(c) Database for the data. Microsoft 
Access(c) may be used to examine and report on the data, and the database 
repair tools are available as necessary. 
3. Now in beta testing - a networked version will be available that allows 
multiple users to view the data and limits the capability of changing the 
data to selected master users.

Contact
Any comments on the design, use, bugs or limitations of the program will be 
most welcome. Email to 
peter.bury@vcp.monash.edu.au









                Registration Form for The KeysBoard
                ------------------------------------

Name       :

Address    :
           :

Phone      :

FAX        :

EMAIL      :

Please select one of each of the following by placing x at 
start of line:
Version  
    1. Data saved in files (as in freeware version)
    2. Data saved in database format (Access 2.0)
Installation
    1. Source code (requires VB 3 or later for version 1,
         VB 4 or later for version 2)
    2. Installation kit for Windows 3.1
    3. Installation kit for Windows 95 or NT
Delivery
    1. Email
    2. FTP download
    3. FTP upload - Please supply details for destination
    4. 3 1/2 floppy via mail. Please supply A$8 p&p and
       allow several weeks
Payment
    1. Mastercard
    2. Visa
    3. Cheque drawn on any Australian bank 

Amount required: $40 Australian  (approx US$29)
                 $48 Australian if shipment on floppy disk

              For card payments

Name on credit card

Credit card number  :

Card Expiration     :

Order 
  1. via email to Peter.Bury@vcp.monash.edu.au
  2. FAX to +61 3 9905 9583, attention Peter Bury
  3. Mail to 
     Peter Bury
     Victorian College of Pharmacy Monash University
     381 Royal Pde
     Parkville
     Vic  3052
     Australia
