Form:
  DragDrop:
    NewX = X; NewY = Y;
    FormDrop();
  MouseDown:
    CCC = 1; ClickPiece = 0; NewX = X; NewY = Y;
    if(Button != 1) ShowProm(); else FillSquare();
  MouseUp:
    if(LegalMoves == 0) ClearLegal();
  KeyDown:
    if(KeyCode != 192) {
      Board.Refresh();
      ClearLegal();
      Tilde = 0;
    }
    if(KeyCode == 32) FlashPiece();
    if(KeyCode == 9) { Forwards = 1; Replay(); Forwards = 0; }
    if(KeyCode == 8) { Tabbing = 1; TakeBack(); Tabbing = 0; }
    if(KeyCode == 27) CompTurn();
    if(KeyCode == 192) { Tilde = 1; Territory(); }


showpic:
  DblClick:
    I = Index; UnPromote();
  DragDrop:
    NewIndex = Index; PicDrop();
  MouseDown:
    CCC = 1; I = Index; ClickPiece = 1; NewButton = Button;
    EndTilde();
    if(Button == 1) PicDown(); else ShowProm();
  MouseUp:
    NewButton = Button; I = Index;
    DropPiece();

HandPic:
  DragDrop:
    ClearLegal();
  MouseDown:
    CCC = 1; I = Index; NewButton = Button;
    EndTilde();
    if(Button == 1) HeldDown(); else HeldProm();
  MouseUp:
    NewButton = Button; I = Index;
    DropPiece2();


PieceID:
  DragDrop:
    ClearLegal();

BlacClock:
  DragDrop:
    ClearLegal();

Black:
  DragDrop:
    ClearLegal();

LastMove:
  DragDrop:
    ClearLegal();

NextMove:
  DragDrop:
    ClearLegal();

Timer1:
  Timer:
    Clock();

Timer2:
  Timer:
    Blink++;

MnuAbout:
  about.show 1

MnuAddBlack:
  EndSetup();
  ExtraPiece = "Black";
  CheckAdd();

MnuAddWhite:
  EndSetup();
  ExtraPiece = "White";
  CheckAdd();

MnuAutoOff:
  AutoPromote = 0;
  SetAutoPromote();

MnuAutoOn:
  AutoPromote = 1;
  SetAutoPromote();

MnuBest:
  Grade = "Best";
  SetDifficulty();

MnuBlackComp:
  If(Computer == "White") Computer = "Both"; else Computer = "Black";
  SetBlackPlayer();
  if(Turn = "Black") Compute();

MnuBlackPlayer:
  if(Computer == "Black") Computer = "None";
  if(Computer == "Both") Computer = "White";
  SetBlackPlayer();

MnuChange:
  ChangeGame();

MnuClear:
  EndSetup();
  ClearBoard();

MnuClockOff:
  ClocksOff();

MnuClockOn:
  ClocksOn();

MnuDiagLarge:
  DiagramFile();

MnuDiagSmall:
  DiagramSmall();

MnuEvalOff:
  Eval = 0;
  Boar.Caption = Cap;
  Board.PieceID.Caption = "Evaluation Off"; Notice = 1;
  SetEval();

MnuEvalOn:
  Eval = 1;
  Board.PieceID.Caption = "Evaluation On"; Notice = 1;
  SetEval();

MnuForce:
  EndMove = 1;

MnuGeneral:
  SetGeneral();

MnuHandicap:
  EndSetup();
  SetHandicap();

MnuLessWeak:
  Grade = "LessWeak";
  SetDifficulty();

MnuLoad:
  LoadGame();

MnuMinus:
  EndSetup();
  Reduce = 1;
  SetHandicap();

MnuMove:
  EndSetup();
  MovePieces();

MnuNew:
  if(LegalMoves == 0) {
    NewGame = 1;
    SetPieces();
  }

MnuNextBlack:
  EndSetup();
  NewTurn = "Black";
  ChangeTurn();

MnuNextWhite:
  EndSetup();
  NewTurn = "White";
  ChangeTurn();

MnuNotOff:
  Notate = 1;
  Notation();

MnuNotOn:
  Notate = 0;
  Notation();

MnuPieceHelp:
  PieceHelp.Show();

MnuPrint
  PrintScore();

MnuQuit:
  Unload Start;
  ConfigSave();
  Exit(0);

MnuReplay:
  Replay();

MnuReplayAll:
  ReplayAll();

MnuReverse:
  Rotate();

MnuRules:
  SetRules();

MnuSave:
  SaveGame();

MnuShowLastOff:
  ShowLast = 0;
  SetLastMove();

MnuShowLastOn:
  ShowLast = 1;
  SetLastMove();

MnuShowOff:
  SeeMove = 0;
  SeeMoves();

MnuShowOn:
  SeeMove = 1;
  SeeMoves();

MnuSuggest:
  SetSuggest();

MnuSwitch:
  SwitchCompPlayer();

MnuTake:
  TakeBack();

MnuTakeAll:
  TakeAll();

MnuTextScore
  TextScore();

MnuThreatOff:
  Threat = "Off";
  SetThreat();

MnuThreatOn:
  Threat = "On";
  SetThreat();

MnuWeak:
  Grade = "Weak";
  SetDifficulty();

MnuWhitePlayer:
  if(Computer == "White") Computer = "None";
  if(Computer == "Both") Computer = "Black";
  SetWhitePlayer();

MnuWhiteComp:
  if(Computer == "Black") Computer = "Both"; else Computer = "White";
  SetWhitePlayer();
  if(Turn == "Black") CompMain();

Tenjiku:
MnuLVer1:
  LionHawkVer = 1; Pieces[18].PrValue = 26; Pieces[47].Value = 26;
  Piece[47].special = 'D'; Pieces[64].Value = 26; Pieces[64].special = 'D';
  SetLionHawk();

MnuLVer2:
  LionHawkVer = 2; Pieces[18].PrValue = 42; Pieces[47].Value = 42;
  Piece[47].special = 'L'; Pieces[64].Value = 42; Pieces[64].special = 'L';
  SetLionHawk();

