Help For KenChess Basics
Copyright 2000 Ken Krause
Web Site: http://www.geocities.com/kenchess2000/index.html
E-mail: kenchess2000@yahoo.com

There are currently two programs in the KenChess Basics suite:
1) PGN viewer
2) Email

This help file is the same for both programs, and notes the differences between the programs where a feature applies to only one program.


This help file should answer any questions you have about using these programs. If it does not and you would like additional information, contact me and I will help you as best as I can. Please read, understand and accept the Copyright notice and disclaimer located at the bottom of this document and on the About window. Use of this program or programs indicates an acceptance of these items.

Whats new from Version 1.0 and 1.1?

There has been some clean up of the interface, mostly in enabling and disabling of some controls at various stages.

Much improved Wizard in the email program.

1.0 files are NOT compatible with 1.1 and above since 1.1 marked the first release that supported USCF and IECC so the file format has a different structure.

The chess engine has been improved to recognize some moves that where ambiguous in the past. Now all positions will be read and written properly when an ambiguous move is detected. In the past, ambiguous positions needed to be resolved by indicating the rank or file for two pieces that could move to a square even if one would be illegal because it exposes a discovered check. The engine now can detect this properly.

The name labels would not always display properly if you rotated the board and loaded a new game. This has been fixed.

The Variation board has been removed from the program. There are some difficulties getting it working properly and is no longer available. Although it was removed in version 1.1, the toolbar icon was not removed so still allowed it to be used. As soon as I get it all together, I will bring it back. If you liked it despite it's flaws, open the Tag Editor and type 'ShowVarMenu' (it is case sensitive) then click 'OK'. It will expose the menu item to open the variation board.

A note on upgrading: It is a good idea to upgrade both the PGN viewer and email program at the same time if you use both. Since the ChessX Control which is the engine has been recompiled and is a newer version, I keep both programs in sync with the control so the latest release always contains the latest control (ChessX.ocx - see the technical notes about this). This way, you can take advantage of the latest version and avoid conflicts between newer and older versions of the control.


Introduction:

KenChess Basics are chess programs I wrote which each perform a specific task. The PGN Viewer is a general purpose PGN reader/writer with some additional features that will allow you to setup positions. The Email program performs the same basic functions but is specifically designed for use while playing e-mail chess and so contains features for keeping track of games played in this environment. Together these two programs form the start of a suite of tools that chess players can use. The advantage of KenChess Basics is that the user may choose which modules or components he wishes to use.

The PGN viewer will create, delete, and modify chess games in PGN format. The file format is native PGN for both importing and saving. One additional feature is the ability to save a game in FEN (Forsyth/Edwards Notation), which allows you to setup a position and begin playing from there. These games can then be saved and when opened, KenChess will recognize they begin with a setup position and will reset the board to that position and play begins from there. Move lists can be saved along with the setup position and all information is retained. Annotation may be added to any move and saved along with the game file.

The Email program will create, delete, and modify chess games that are played by e-mail. The biggest feature provided for this is the ability to save all time and date related data along with the game file. From this data, KenChess Email will build a 'Report' of a move transmission message, game result report, request for arbitration or log file for your game. There are various setup options as to how your game will behave when you open it such as which side of the chess board to view the game from, to go to the end of the game every time it is opened, date format to use, etc. Email will track and calculate your time automatically based on the dates for sent, received and replied or you can enter it all manually. Email will even do time additions and knows if time should carry over or not into your next series of moves.

The quality of the files you import have a bearing on how well KenChess behaves. KenChess follows the PGN standard for reading and writing chess games. I do not expect that every user be an expert at algebraic notation and the PGN standard, but some degree of knowledge in these areas is a must for serious chess players. KenChess can handle a certain amount of non-standard issues, but cannot resolve all of them. The cleaner the file you import, the better the results on how they are displayed and viewed.

I will be the first to admit that these programs are not perfect and no program will ever meet the needs of all users. I have tried to provide the most desired features that the majority of users want, and have left out those features that may be cool, but would only be used by a few users.

These programs are freeware so they are fully functional and will remain so for as long as you use them. I hope that users can benefit from them and if they do like them, let me know about it and tell some chess friends too. 


Getting Started:

Both programs share a similar main window so both programs are described here. The exception is on the Email program in which case the game status information has it's own window and the time tracking information is in its place.

The main window contains several different areas. There is the chessboard and there is a list box for displaying header tags, the move list, and editing and viewing annotation. If there is annotation for a move it is automatically displayed in the annotation text box. At the bottom of the window is a list box that will display all the games in memory that have been created or have been imported. The smaller box to the left will display the moves for the game that is highlighted in the game selection list box.

There is a toolbar at the top, and a status bar on the bottom of the window. You may toggle these on and off if you want. The toolbar contains buttons of the most used features such as Open/Save, and has the controls for navigating through the game. The status bar will display information pertaining to the move played, and number of games in a file. There is a menu bar above the toolbar and all features can be accessed from the menu items.

All other features will appear in their own window, the following is a list of additional windows that will appear as needed:
 
Tag Editor
Find
Setup Position
Options
Correspondence Options (Email only)
Game Status (Email only)
Reports (Email only)

Files are opened using the menu item File/Open and they will be imported and then displayed in the game selection list box. To select a game either double click it or highlight it and use the menu command File/Load. This will load the game into the 'Player'. It's moves, header tags, and annotation (if any) will be displayed in the appropriate boxes.

To save a game, use File/Save. Save will save the game currently being played into memory. Use Save All to save the entire game file (all games in memory) to disk.

To start a new game, select File/New.

When imported, games are parsed from the file and separated into individual games. The header tags are then used to display in the game selection list box. I have chosen to simply display the header tags as they are imported for several reasons. They are easily recognized and game files that do not follow standard header tag convention will still be displayed without trying to resolve unrecognized headers.

Menus:

Below is an explanation of the menu commands found in both programs. Some pertain only to the Email program and are noted as such. The items that are specific to the Email program will not be found in the PGN viewer.

File:

New - Sets up a new game on the chessboard. If the game was opened from the game selection list, then if it has been modified you will be prompted to save the changes before loading or starting a new game.

Open - Opens a file for importing into KenChess.
Load Game - Loads the selected game from the game selection box to be played out on the chessboard.

Close - Closes an open file. All games in memory will be removed from memory.

Save Game - Saves the loaded game into memory.

Save Game As - Displays a file 'Save As' dialog box for saving the loaded game to disk in PGN format.

Save All - Saves all games in memory to a file.

Save All As - Saves all games in memory to a new file.

Print - Prints the loaded game in PGN format.

Exit - Exits the program

Edit:

Find - Displays the Find window. Header tags and move lists can be searched for text strings using find. A simple means of looking for names in header tags or expressions like =Q or Ne6 in a move list.

Copy Game To Clipboard - Puts the loaded game on the clipboard in PGN format.

Copy Board As Bitmap - Performs a screen capture of the chessboard and puts the bitmap on the clipboard.

Mark As Deleted - Marks the selected file for deletion. Games are not actually deleted until the file is saved. All games marked for deletion are not saved with the file. This is a toggle so you may mark and unmark games. When you save the game file, the program looks to see if it has been marked for deletion and if not, then saves them. If it has, it just ignors it without saving it and moves on to the next game.

View:

Toolbar - Toggles display of the toolbar on and off.

Status Bar - Toggles display of the status bar on and off.

Options -

Setup Options - Displays the Options window for setting program options. Options are saved when the program closes and read when it starts so you can save the configuration of colors and options selected.

The options page will allow you to set the colors for the light and dark squares of the chessboard, define how the Autoplay feature behaves and set which style of movelist you prefer.

The programs will generate move lists in three different styles - paragraph, list and annotation. Although they are self explanitory, I will describe them.

Paragraph move lists are formatted to appear as a paragraph does in a book. Annotation will not appear along with the move list even if it exists. The paragraph move list writes moves with the move number followed by a period, then the move in short form algebriac notation like this:

1.e4 e5 2.a4 a5 *

There is no space between the move number period and the move.

The list style displays like this:

1.  e4	e5
2.  a4	a5
*

Again, no annotation will be displayed. The annotation move list includes annotation and will add a space between the move number period and move:

1. e4 {comment} e5 2. a4 a5 *

This is noteable because if you must have the space between the move number period and move - just use the annotation move list. It will then appear like this if you do not add annotation:

1. e4 e5 2. a4 a5 *

These different styles are the most common and some people prefer one over the other, so you can select what you prefer.

Correspondence Options - Displays the options window with the option settings for the loaded correspondence game. Each game has it's own game options so you can set each games options independently of each other. This window is only available in the Email program.

Board:

Reverse View - Toggles the color view that the game is seen from.

Player:

Move First - Goes to the first move of the game.

Move Previous - Moves to the previous move in the game.

Move Next - Moves to the next move in the game.

Move Last - Moves to the last move in the game.

Previous Game - Loads the previous game on the selection list.

Next Game - Loads the next game on the selection list.

Start Auto Play - Starts Auto Playing the loaded game.

Stop Auto Play - Stops Auto Play.

Tools:

Reports - Displays the Reports window. This window is only available in the Email program.

Edit Tags - Displays the Edit Tags window.

Setup Pieces - Displays the Setup Position window.

Game Status - Displays the Game Status window. This window is only available in the Email program.

Text Editors - This will display the chosen text editor to open. The program will be looking for these editors in the c:\windows directory. Some setups of Windows may install the text editors in other locations so you will get an error message if they cannot be found in the default directory. It is handy to be able to pop open a text editor and paste games or baord bitmaps into so I added this.

Help:

Help - Displays this file.

About - Displays the About window.	

Additional Features:

Here is a description of the features and there use.

Setup Position: When the window opens the chessboard is setup to the starting position. You may clear or reset the board by using the menu items Tools/Clear Board or Reset Board. The toolbar contains a picture of each piece and a Delete symbol. Select a piece to add by clicking it on the toolbar. The button will set indicating which piece is selected. Then click the square of the chessboard you want to place the piece on. It will be placed on as many squares as you click until changing pieces. To delete pieces, select the 'Delete' button and select the piece you want to delete.

There are controls to set the status the game will begin in once you have finished. You can set the castle options, EP square, move number and fifty move rule number (the number of moves that have been made since the last pawn move or capture - KenChess will display a message if the fifty move rule has been violated).

Once you have finished click OK and the window will close and the position will be setup on the main chessboard. The header tags will be updated to include a Setup and Forsyth tag containing the information needed to recreate your setup position. This information will be saved along with the game file as well as any moves and annotation made from this point on.

The porgram does not do any legality checking when accepting positions other than to make sure you have both Kings on the board so it is possible to setup an illegal position. It is up to you to know if it is legal or not.

Variation Board:
Not implimented at this time.

Tag Editor: The Tag Editor may be invoked by either using the menu item under Tools or double clicking on a tag you want to edit in the header tag window. This will bring up the Tag Editor with the selected tag ready for editing. You can add, delete, and edit tags with this editor. Select a tag to edit and it will appear in the editing box ready to edit. Above the editing box is a label which will display a message about what you are editing and it's current value. When you have finished editing, click 'Apply' or hit 'Enter' to accept your changes. You can then edit another tag by selecting it in the selection box.

To add or delete a tag, click on the appropriate button. You will be prompted for either the name of the new tag to add, or a confirmation that you want to delete that tag.

When finished, click OK and your changes will be applied back to the main window. Cancel closes the window and all changes are ignored.

Find: Find will search through the games in memory and look for matches in the header tags and moves. It is not case sensitive and you may search in four directions. If a match is found, that game will become highlighted in the selection box.

Annotation: KenChess supports bracket style annotation. You do not need to add the brackets, KenChess will do that for you. Just enter your annotation in the text box and click 'Apply Annotation'. To clear a moves annotation, click 'Clear'. Annotation will be saved with the game file when it is saved.

Options: KenChess will save your option settings when the program closes and those values will be restored the next time you start the program. There are four options you can set:

Auto Play: Sets the way the program will Auto Play games. The settings can be made for repeating the same game, playing once through the game then stopping, playing a game then loading the next game and continuing, or playing and loading the previous game and continuing. You can also set the speed at which the game plays. The values are from 1 to 90 seconds.
	
Promotion Piece: This sets the piece to use for promotion moves. This only applies when you are making the moves. If a PGN game is read in and a promotion move was made, the notation will indicate the promotion piece and that piece will be used.
	
Board Square Colors: Click on the color box to bring up a color selection dialog box for selecting your preference for that squares color .
	
Move List Style: This sets the style of move list to be displayed in the Move List box on the main 	window. Additionally, whatever style is selected will also be used for copy to clipboard operations. The default style is List, but you may view the move list in Paragraph, and Annotation styles as well.

Email Features:

This section explains the features found in the Email program that are specific to this program.

KenChess Basics Email has many features to make keeping track of your email games easy. Also, when you start a new game, an easy to follow setup wizard will take you through the process. The wizard has its own menu item and contains all the information needed to setup every option available. Using the File/New menu item bypasses the wizard and just sets up a new game. All the information that the wizard gathers is available under the appropriate menu items so even if you do not use the wizard you can still adjust your game options at any time.

One thing I did in this program is make it fairly smart in the fact that it knows the differences between different organizations. Each organization has slightly different time controls and requirements and the program actually knows which time controls to use for each organization. The real biggie here is reflection time. With IECC, time remaining is really a function of the total of the last 9 moves subtracted from the number of days allowed (30) for each time block (10 moves in 30 days) which gives the time remaining for reflection on the next move. The window is constantly moving as you play since the block is based on each set of 10 moves (moves 1-10, 2-11, 3-12) and the program will always adjust to follow this window. Cool.

Additionally, for IECC you can still change the number of moves to be made within a block of time and the program will use those values to determine time remaining and time oversteps. The program uses the values indicated in the setup. The only one that is not dynamic is 10 days for a single move, that you cannot change. So if you set up an IECC game with 20 moves in 40 days, it will base the calculations for time oversteps and time remaining from those values. The time tracking scheme may be used for any organization that tracks time this way then. Just use IECC setting for organization and set the desired time controls.

With IECG and the USCF the reflection time is just simply a matter of subtracting the time used for the move from the time remaining for reflection. When you reach another block (blocks are moves 1-10, 11-20, 21-30 etc.) another time block is added to the total time remaining since time is allowed to carry over and be used later. Again, the program will look at your settings and act accordingly to your setup.

The program will also remind you when it is time to add an additional time block after you make the last move of a time block - except for IECC which has a different scheme. Since IECC always uses 30 days to make 10 moves, the window always moves and the next move is considered the tenth in that block. Now we just set reflection time to 30 days and subtract the previous 9 moves reflection time and we keep the totals running fine.

This example is for a IECC game with regular time controls. If you adjust the time controls, the program will use your values and figure it all out. For example, if you use 20 moves in 40 days, then the program knows that time remaining for the next move is the total of time for move for the last 19 moves subtracted from the 40 days. Additionally, the time overstep must then exceed the number of days used for reflection for the last 20 moves.

The program also informs you when a time overstep has occured, and in the case of IECC, since there are two ways to overstep time, you will be informed of both a violation of exceeding 10 days per move or exceeding 30 days for 10 moves. IECG and USCF will flag when the time for reflection goes below 0 (zero) days. Any move that leaves reflection time less than zero is a time overstep for IECG and USCF.

There is one problem I have not yet solved and that is what to do after a player exceeds his allowed time and you flag him for the overstep. As it stands now, you will need to switch over to manual mode and readjust the time remaining to whatever is decided to get play going again. The program will just continue to use the math routines to calculate time based on the last move so if a player runs a negetive number, and then uses more time next move, the program will keep subtracting that time used from the time remaining.

The reason it is as yet unsolved is there is no good way to program what might happen. It is up to the TD to direct how play will continue (usually with a time bonus/penalty) so you will have to do it manually. After adjusting the time, you can switch back to automatic and the program will pick-up from there using the numbers you entered.

Correspondence Options: This displays the Correspondence Options window where you will edit the settings used for that game. The features are:

White Player Name And Email Address - Enter the name and email address of the white player.

Black Player Name And Email Address - Enter the name and email address of the Black player.

Tournament Director Name And Email Address - Enter the name and email address of the Tournament Director.

Time Control: Use this to setup what the time controls will be for the game. Expressed in the number of moves to be made in a set number of days.

Date Format: You may select from two date formats. This date format is used for all displayed date data and in any reports that you generate.

Unused Time: This determines if unused time will carry over or not. If time carries over then when you have reached the set number of moves to be made in a set number of days, you will be prompted if KenChess should automatically add your next time block. If you choose yes - it will be added to your time remaining. If unused time does not carry over, then at this time your time remaining will be reset to the number of days allowed for making you set number of moves.

Color View: Determines which side of the board to view the game from when it is opened.

Tracking: The whole idea behind the time tracking is that it is always there in plain view and easily edited for all moves. As you go through the moves, the time for that move will be displayed in the time controls so at a glance you can see them. There really are not many controls used for tracking time, and with the calculation done automatically, keeping accurate records of all your games is easy and since the program knows how to calculate time based on the settings for each organization and flag time oversteps for each, it is even easier than easy.

You may select either Automatic or Manual time tracking. In Automatic tracking, all values are calculated and updated for you and you cannot edit any of the time information other than the dates - with two exceptions. Since some organizations count moves made within 24 hours as not counting for any time used while others base time on date difference, there is a 'Use My Entry Instead' check box underneath the date controls. If you check this box it will enable the Time For Move controls so you may override the calculated date difference. KenChess will then use your value for Time For Move in the rest of the calculations and not the calculated date difference. The other exception is for penalty and bonus time. You will need to enter this yourself if this information pertains and so this is always enabled. If a player oversteps his/her allowed time, you will be prompted that a time overstep has occurred.

The default calculation is by date difference meaning that is is based on the literal difference of dates and not a 24 hour period. If your opponent sent on 2000.01.01 and you received on 2000.01.01 and replied on 2000.01.03 the time used for the move will read 2 days.

In manual mode you will have full control over all the values and no automatic calculation is performed. You will need to enter all the information yourself. Additionally, all prompts for assistance from KenChess relating to time are disabled in manual time tracking mode.

One note here - I have not set the program to convert all the time information if you change from manual to automatic sometime during a game, in theory it should if you alter the time for your first move because I have a routine that checks for that sort of thing - but there really is no guarentee. The program will track fine from that point on, but you should go back and make sure the time has been done properly while you where in manual mode to make sure you have accurate information. You should decide before the game starts which mode you prefer and stick with it. Makes it much easier.

when you apply your time, the program will look to see if this is the last move of the game. If it is it will not recalculate any time previous to that move since it will not effect any previous moves time. If it is not the last move played, then it will append the information from the edited move forward but not backward for the same reason - it does not effect a move that occured prior to the edited one. But knowing this, you can force it to recalculate by editing the first move since then all moves after will be effected and recalculated. Then go back and redit with the original data and you should be back in business. 

In reality, I added the manual mode as a back door in case there is a serious bug or flaw in the program and need a way to keep going despite the bug. If there where no way to over-ride the automatic time routine, we would all be at it's mercy should anything creep up during a game. This will allow you to just switch to manual and keep going should a problem occur that causes the program to wrongly calculate a time that you cannot correct. If this happened then all moves after that one would be wrong as well. Not that I anticipate any problems, but I know things happen - so be prepared for them. I cannot predict what may occure during a game to throw a loop into the time tracking, so if all else fails, you can still use manual to enter the data.

Play To End On Opening: This determines if a game jumps to the last move made when it is opened or starts from a starting position.

Using The Time Controls:

The time controls are disabled until a move has been made. Once a move has been made, all controls relating to your game's setup options will be enabled based on your choices. Some controls will appear with certain options and will not appear with others. You will have access to them if they apply.

Use the calendars to set the dates for Sent, Received and Replied by either highlighting the number in the date and entering new data or by using the drop down calendar. The drop down calendar has many features that make moving from date to date easy. A few seconds after you stop editing any automatic calculations will be made and you will see the result in the Time For Move text box. The 'Apply Time' and 'Undo' buttons will become enabled when your time has been edited and changes made. Click 'Apply Time' to commit your changes to memory or undo and start over.

When you apply the changes all automatic calculations are performed and the results will be displayed in the appropriate text boxes. You will also be prompted if it is time to add time if you have reached that number of moves. If in manual mode, then the values you have edited will be committed to memory.

You can always go back to edit your information. If you make an edit to a previous move then all moves after that move will be updated (in automatic mode). The values used will be the values for time move/game/remaining and not date so if you over-rode values, your values will still apply and your time will be unchanged due to date difference calculations.

Reports:

Don't get freaked out by Reports - this is my brainchild and as I said, these programs are experimental and this is an experiment. First, here is the problem: every organization formats their messages, game reports and requests for arbitration a little differently then the next, so how do you create a program that will allow you to use it with all organizations without writing a different output routine for each one?

I figure it this way: all the information is there to be had as you play the game as far as headers, moves, names, addresses etc. go. When the time comes, you just assemble it how you want it and you have your message. By using the Reports format it allows you to select what information gets printed and in what order - and if that is not good enough, you can create custom lines for your report. This allows you to use the same information and format the output messages any way you need them (if a default does not do it for you).

A report is really just a message built using text strings from within the open game file and assembled into some order of output. Either the program does it for you (a default report) or you define the order (a custom report).

I have included four pre-defined reports, and each default report can be generated for one of three organizations - IECC, IECG or USCF:
1) E-mail Move Transmission - The basic message you send to your opponent.
2) Game Result Report - Used to inform your TD of the result of a game.
3) Request For Arbitration - Used to report time oversteps or any other infraction to your TD in order to get arbitration on a game.
4) Game Log - Shows all move and time information for the game.

I have created a list of most commonly used lines used in messages. These make up the selection list that you may use to crate a custom report, and I use them to create the default reports. When you select a default report, the program assembles the list of lines to output and gathers the information from your game and writes it to the text box. That is it.

If you are playing with any of the supported organizations, all you need to do to create a message is this:
1) Select the organization.
2) Select the Report Type.
3) Select whether or not this is the first game of the message or not.
4) Click 'Create Report'.

It will appear in the text box and is ready to go. Some reports will need you to fill in the blanks because that data is not known - such as dates for resends and reason for requesting arbitration with a Request For Arbitration Report. Otherwise, as long as you supplied all the needed information in the setups and header tags, the default will fill in all the blanks for you.

The default reports will probably handle 90% of users needs, and even if one does not, it is usually a very easy task to hand edit the closest one to your exact needs or this is where you would want to create a custom report.

Once a report has been generated, it will be placed in the text box. From there you may copy it to another application or the clipboard, print it, or save it as a text file. There is a check box that controls if a new report is added to the current report or if the text box is cleared first.

The default reports are pre-formatted and so cannot be modified. Since every organization has different requirements for what must be included in a message and how they must appear, default reports may not be applicable to every circumstance, so by allowing the user to create custom reports, this gives users the advantage of using KenChess regardless of the organization you are playing with.

One additional note. I tried to make the program somewhat intuitive when generating output messages. Usually you would only put certain lines of information once at the top of the message - like email addresses and names. Also, time info is the same for all games since they must be sent together so some organizations allow you to just use the same one for all games. If the game is the first game it will include this information, then automatically click the option button for you for the additional games and click the check box to append the existing message.

If playing more than one game, this allows you to build your message and keep adding games to the message as you would build a message in a text editor. The programs knows that any following games do not need this information again (depending on organization) so will not add it, it will just add the game to the existing message as it should be formatted. The exeption here is with IECG. The IECG format just repeats itself for every game. Again, the program knows and will do it the right way.

Opening a new Report will reset the Game to first, and uncheck the appen box since there is nothing to append from a new file.

A typical example of sending a message for a two game match would follow like this:
1) Open game 1 and edit moves and time.
2) Save the game.
3) Open Reports and select organization and report type (move transmission message here).
4) Click 'Creat Report'
5) Minimize the Reports window.
6) Open Game 2.
7 Edit moves and time.
8) Save game and game file.
9) Restore the Reports window with the first game in the text box.
10) Click 'Create Report' again to add this game to the first one.

The message is done and ready to send.

After a little playing around you will get the hang of it and will be creating messages in seconds.

Default Reports - There is a tabbed dialog that allows selection of either default or custom reports. On the default tab are several reports to choose from. You may select one or any number of them to be generated at once. Simply select the desired report and click the 'Create Report' button. The report will be generated. To generate a report KenChess will put the report format onto the selection list of the Custom Reports tab so any fields selected will be cleared and the selected default report will appear.

Custom Reports - Click the Custom Report tab to expose the controls for a custom report. There are two list boxes and five command buttons. The left list box shows what fields of information are available to be output. The right list box will show what fields are selected and the order they will be output. To add a field from the list of Available Fields, either double click it or highlight it and use the direction arrow button to add it to the Selected Fields list. There is one item named 'Custom' - select this item and you will be prompted for the line you want to define. Enter your line as you want it to appear on the report. You may add as many custom lines as you want (up to 32,000). After creating your report you can generate it, or save it as a file to be used again.

You can clear all items from the list of selected items by using the 'Clear List' button. 'Open Custom' will allow you to open a custom report you have saved.

You can only work with one type of report at a time. KenChess will look at the tab you have selected and generate the report based on that setting. If you have default reports selected but are in the Custom Reports tab, then the default reports are ignored and KenChess will use the items on the Selected Fields list box to generate the report. Remember - KenChess will use this list box when assembling a default report so you will need to save any custom report you are working with before generating a default report or your report will be lost since KenChess will first clear this list box before assembling the list. On the other hand, if you opened a custom report, then switch to run a default report - your custom report will be overwritten with the default report selected.

Available Fields To Select From - Here is an explanation of what the fields are that you may select to output. KenChess will use whatever data is valid at the time the report is generated based on the values for the game currently loaded.

(Color) Player - Uses the value for the (color) Player as set in the correspondence options window.
(Color) Email - Uses the value for the (color) Email as set in the correspondence options window.

(color) Time M/G/R - Time for that player expressed in Move/Game/Remaining (M/G/R) or just Move/Game (M/G).

Space - Adds a blank line.

Custom - Allows you to define a custom line of text. You will be prompted for the text as you want it to appear on the report.

Game Log - Outputs a game log.

Header Tags - Outputs the header tags.

Move Lists - Outputs the game in PGN format with the move list style selected such as /Annotation, /Paragraph, or /List. It will not include header tags.

Example: To create a report that would give you your game in standard PGN format, you would assemble a report like this -

Header Tags
Space
Move List/Paragraph

EMailer:

The Email program has a built in emailer that will work with Microsoft Outlook '97 or Outlook 2000 for sending your game messages. After you create the desired report, click the 'Send Using Outlook' button or use the menu item under Tools and the Emailer will open with the report already in the text body for the message. You then can use the drop down combo list to set the name to send and carbon copy to, or type in the address yourself. The lists will show the email addresses for the white and black players and the TD as found in the correspondence setup option for the game.

This email form will only work if you have Microsoft Outlook (not Outlook Express) installed on your computer. It will generate the email message for you and send it using Outlook as a gateway to your email provider. It is not a full featured email program, but instead uses computer code to assemble and send the message through Outlook and relies on your Outlook configuration for handling the actually sending of the message.

Limits:

The limit for the number of games you may have in memory at one time is 32,000. The selection lists for Header Tags and Reports is 32,000 entries. The maximum size limit for the text boxes used for move lists, annotation and Reports is 32K. These limits may vary based on the amount of available RAM on your computer since imported files are parsed to separate games into individuals for display and stored in memory. I calculate that 32,000 games in memory with an average size of 1K bytes per game (actual game data and array overhead) comes out to 32M of memory. Most games are smaller (40 moves is about 500 bytes) but this gives an easy math example.

Technical Notes:

The programs just uses a flat file (sequential text) to write out the option settings and in the case of the email program, all the details and settings for the games in the file. This is a simple method, but it works fine and no real reason to do it any other way. The program writes all games out when you use Save All starting from the first one to the last one, and writes the data out in a sequence that is repeated when the games are read back in.

This way, the data always falls into the same position so when read in the values are assigned as they are detected. The number and placements of the lines is critical, so if you edit the files, do not alter the sequence or location of the lines or the program will not be able to read all the information correctly.

Some of the data is criptic and may not be easily discerned as to what it is or why it is there, but the program knows so don't delete anything. You will see that your games are stored in PGN format in the email program and there is a section that contains all the time data - this way, it is all retained for every session. This can be useful if you just want to view the games quickly with a text editor or make minor changes to the header tags in a text editor. It can be done easily and it is even possible to copy and paste games if you are playing a multi-game match and really only need to switch the information for the players.

I somtimes create one game with the Wizard, then copy and paste the entire game several times, then read it back in and then just edit the information based on this 'template'. If you do, copy the entire section from brackets to brackets like this:

<KCBemail>
Data...
<KCBemail>

The program looks for the bracketed line to indicate that it is a proper file, then again, recognizes the last bracketed line to indicate that the end of this game has been reached.


These programs were written in Visual Basic 6 and use a custom chess user control I created and compiled. These programs are experimental and are the first programs I have written using the user control. The user control is called ChessX and you will see the compiled .ocx file in the directory you install the program into - it is called ChessX.ocx. Do not delete this file or the programs will not run.

The user control is the brains behind the programs. A control is an object within the program that is controlled by code: text boxes, menu bars, labels, list boxes, buttons and anything that appears on a form that you use to make the program do what you want to do are some examples of controls. These controls have methods, properties and events that are coded to instruct the control as to how to behave and what to do and when. ChessX is a special kind of control.

The ChessX control is a self contained chess engine that understands the rules of chess, displays the graphical representation of the chess board, and interacts through code. It is compiled and then becomes available to be used by any program that will accept user controls. The control is placed into a container object (a web page, Word document, Access form, or VB form) and is then programmed like any other control, only ChessX is chess specific and has many more properties, methods and events then simpler controls.

By rolling all the code and graphics needed to play chess into the control, as soon as the control is placed into the container object, you are starting with a fully functional chess program without writing a single line of code! (you, I spent years writing it). This keeps the parent project free from 100's of K worth of code and graphic controls that would need to be incorporated into the project, coded, and compiled. With the ChessX control, you use the same control in whatever your application may be, and the added functionality of being able to control it and use it wherever you can use controls and VB is a real advantage. That is the idea behind it - have chess control, will travel. Just size it on your form and add a little code to it and you have the makings for your own chess application.

So what exactly is inside ChessX?
First, there are the squares of the chess board and all the graphics for the pieces. The board is also framed and has the labels that display the coordinates and the names of the players for each color. Once a move is made, ChessX has all the code to check move legality of the move made and will either make the move if legal, or place it back to the start square if it is not. ChessX then creates or appends the move list. ChessX also contains all the code to read and write Forsyth Edwards Notation (FEN) and can read and write move lists in three different styles. All this is contained within ChessX and the code instructs ChessX to either do something like go back a move, or asks ChessX for information, like the move that was made for black on move 23.

What else can ChessX do?
ChessX can be controlled to do everything relating to chess that you see in these programs (and more). It is really ChessX doing the chess stuff, and the program just tells it what to do and when. The program just sits around the control and has the menus, toolbars, and graphic eliments that allow you to control ChessX. Whenever you click a button, or use a menu item that does something chess related, the command is sent to the ChessX control and it is done.

ChessX can:
Reset the board to start a new chess game.
Change the color view of the board.
set the player labels for the names of the players.
set the light and dark square colors.
Generate moves by passing a string argument.
Jump to a move by supplying the ply.
Load a game, move or position on demand.
Load a game that starts from a setup position using FEN strings.
Get the move list in paragraph, annotation or list style move lists.
Get the FEN string for any move made in the game.
Get the move number, ply, on move, game length, 50 move rule etc., etc. data.
And on and on and on...

The control is controlled by using easy to use commands like:
ChessX1.GameReset - (sets up a new game)
ChessX1.MovePrevious - (goes back one move)
ChessX1.MoveNext - (goes forward on move)
ChessX1.LoadGame(Game as String) - (loads a move list)
ChessX1.LoadSetup(FEN as String) - (loads a FEN position)

To get an idea of what ChessX is all about, open an application where you can add user controls (like Word or Access forms) and add ChessX to it. Size it on your container form and run it. You will be able to play a game of chess without having to write a single line of code. Only once through because you will need to reset the board using code. You can use the Object Explorer to see what is inside.

If you would like more information about programming the control, contact me.


Copyright Notice And Disclaimer:

This software is FREEWARE and requires no fee or registration to use. Although this software is FREEWARE, this software is Copyright protected and is not in the public domain. The author has sole ownership and retains all rights as such. This software may be copied and distributed freely provided that the KenChess name, images, likenesses, text and graphics contained, and all original distribution material are distributed. No changes, alteration, additions, or deletions may be made to distribution material. No person or organization shall charge a fee or require payment for the distribution or use of this software without permission from the author.

The ChessX control is Copyright protected and is not intended for distribution outside of this software. It may not be distributed outside of the software distribution file by any person or organization without permission from the author. I do grant individuals the right to use the control for personal and experimental use, but no rights as to the distribution of the ChessX control outside of this software is granted to any person or organization without permission from the author. The ChessX control may not be used or distributed with any software other than this, except in the limited grants above. All use of the ChessX control must state that the control is Copyright protected and the author's name and Copyright must appear in the container project where it is visible to all users and no claim as to authorship or ownership of the ChessX control may be made by the user. All software authors who wish to use and distribute the ChessX control must secure permission from the author before attempting any distribution.
 

Disclaimer:
THIS SOFTWARE AND INFORMATION IS PROVIDED "AS IS" WITHOUT REPRESENTATION OR WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY REPRESENTATIONS OR ENDORSEMENTS REGARDING THE USE OF, THE RESULTS OF, OR PERFORMANCE OF THE SOFTWARE OR INFORMATION, ITS APPROPRIATENESS, ACCURACY, RELIABILITY, OR CURRENTNESS. THE USER ASSUMES THE ENTIRE RISK AS TO THE USE OF THIS SOFTWARE AND INFORMATION. IN NO EVENT WILL KEN KRAUSE BE LIABLE FOR ANY DAMAGES, DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL, RESULTING FROM ANY DEFECT IN THE SOFTWARE OR INFORMATION, EVEN IF KEN KRAUSE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THIS DISCLAIMER SHALL SUPERSEDE ANY VERBAL OR WRITTEN STATEMENT TO THE CONTRARY. IF YOU DO NOT ACCEPT THESE TERMS, YOU MUST CEASE AND DESIST USING THIS PRODUCT.

