AutoChess Manual - Pleas read this file through before using AutoChess.

You now have the ability to write your own chess tutor, chess opening, chess testing programs with ease. This ActiveX control allows you to pass information to, and receive information from the control itself. The control takes care of most of the game including Castling and Promotion the only thing it doesn't do automatically is the en-passant capture. The board moves the pieces by getting information from the user via the mouse, to move a piece just click on the from square then click on the to square and the board will move the piece. Please note this is not a chess-playing program, it does not know the rules of chess, you can for instance move pieces anywhere on the board. The program is to enable people who have an interest in chess but a limited knowledge of the computer programming language they are using to create Chess based programs.

To install the basic control in visual basic:
First unzip the AutoChess.zip file.

 1. Copy the file AutoChess.ocx/AutoChessSW.ocx to your C: drive.
 2. Start Visual Basic
 3. Select the Standard EXE
 4. From the Project Menu Select Components
 5. Select Browse and navigate to the C: Drive where you will see the file.
 6. Double click on the .ocx file to include it in your toolbox.
 7. Close the file list box by clicking OK.
 8. Double click the new .ocx icon in the toolbox (it looks like a little square divided into 4)
 9. Maximize all windows and click on the chessboard.
10. Use the sizing handles to get the board in full view.

Using AutoChess.

Making sure the chessboard is selected note the Properties Panel there are three main properties.

1. PutMove - Puts a move onto AutuChess board.
2. GetMove - Gets a move played on the AutoChess board.
3. PutPosition - Sends a set position to the AutoChess Board.

Before using AutoChess Name. Property rename the control with a name that suits you, for now name it Board1.

Open the main from so you have space around the board.
Place a Command Button on the form.
Double click the Command Button to open the code window.

Insert this line:


Board1.PutMove = "E2-E4"

Note: When you type the full stop you should get a drop down list of properties. If you don't the Control is not installed in your program.
Run the program and click the Command Button and the board will play pawn to king four for white.

Place a text box on the form it will be called Text1.
Double click the chessboard to show its code window.
In the right hand drop down list choose - CHANGE

Insert this line:

Text1.text = Board1.GetMove

Play a few moves on the board using the mouse and you will see the Text Box reflect the moves made.

Place another Command Button on the form and double click it to show the code window.

Insert this line:

Board1.PutPosition="R******R************************************************r******r"

Run the program and click the command2 button, a position will appear on the board with the four rooks on their initial starting squares. The row must be 64 characters long and contain only the following characters:

K=White King	k=Black King
Q=White Queen	q=Black Queen
R=White Rook	r=Black	Rook
B=White Bishop	b=Black	Bishop
N=White Night	n=Black	Night
P=White Pawn	p=Black	Pawn
*= Empty Square

You can cut and paste the above line of code into Visual Basic to save you typing it in. Why not add a few pieces, making sure the length is 64 characters, and see what you get.

If you want to start with the initial position there is a short cut: enter the line Board1.PutMove = "**"

There is an accompanying program you can run to see the basic uses of the control. I'm sure the more inventive will be able to come up with more sophisticated programs.

To install the .oxc control and try the accompanying program.
Please note the source code is well documented to help you use the control.

When you have unzipped the file.
Copy the AutoChess folder to your c: drive.
Start VB and click Existing
Navigate to drive c:/AutoChess or c:\AutoChessSW folder (If you are using the free version)
Double click on Chess.vbp
Click Project - Components
Make sure Project1 is ticked
If it is not there click browse and find AutoChess.ocx or AutoChessSW.ocx in the C:\AutoChess folder on drive C: and add it to the list.

You should now be able to run the program. If you have problems you can e-mail me paul@themerrybrewer.co.uk
