Articles

procedure TMainFrm.FormKeyDown(Sender: TObject; var Key: Word;Shift: TShiftState);  
begin  
  IF MyCAD1.GetSelectedShape <> nil then  
  begin  
   if (Key=37) then    //Left  
     MyCAD1.Move(MyCAD1.GetSelectedShape,-1,0);  
   if (Key=38) then    //up  
     MyCAD1.Move(MyCAD1.GetSelectedShape,0,-1);  
   if (Key=39) then    //Right  
     MyCAD1.Move(MyCAD1.GetSelectedShape,1,0);  
   if (Key=40) then    //down  
     MyCAD1.Move(MyCAD1.GetSelectedShape,0,1);  
  end  
end;