@Josh
Thanks
Images are named I1..I52;
North,South,East and West are hands of 13 cards.
North's hand can contain 1,9,16,17,18,19,22,23,24,25,32,41 and 52
So 1 would be I1 which is the Ace of Clubs and 9 would be I9 which is the 6 of Clubs, and so on.
After the distribution of the cards I always know the card number in two hands the South hand and the Dummy hand.
I may know the cards in the other two hands if I'm replaying a saved hand from history. If this is not a replay the cards not in South's hand and the dummy hand are in the ThePool.
Every Image onclick event is coded to CardAction
CardAction decides what action need to happen to say the Ace Spades.
If it is North turn to play I don't want East,South or West cards to be active.
That's why I was wondering if there is way to turn OnClick events on and off.
procedure TForm1.CardAction(Sender: TObject);
Var S: String;
Hand: HANDS;
CName: String;
aName: String;
CNo: integer=0;
aLeed: String;
begin
if (sender is timage) then begin
CName := TImage(Sender).Name; {'I40'=Ace Spades}