Und wie wäre es in dieser Art?
Delphi-Quellcode:
case Key of
VK_RIGHT:
if ActiveControl = RzBmpButton1 then ActiveControl := RzBmpButton2
else if ActiveControl = RzBmpButton3 then ActiveControl := RzBmpButton4;
VK_UP:
if ActiveControl = RzBmpButton3 then ActiveControl := RzBmpButton1
else if ActiveControl = RzBmpButton4 then ActiveControl := RzBmpButton2;
VK_LEFT:
if ActiveControl = RzBmpButton2 then ActiveControl := RzBmpButton1
else if ActiveControl = RzBmpButton2 then ActiveControl := RzBmpButton3;
VK_DOWN:
if ActiveControl = RzBmpButton1 then ActiveControl := RzBmpButton3
else if ActiveControl = RzBmpButton2 then ActiveControl := RzBmpButton4;
end;