Ver Mensaje Individual
  #3  
Antiguo 02-12-2016
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - España
Posts: 18.307
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Bienvenido a los foros. Te aconsejo que revises la guía de estilo.

1) Crea un proyecto nuevo.
2) Añade un Timage a un formulario y asignale una imagen en la propiedad Picture
3) Cambia la porpiedad KeyPreview del formulario a True.
4) En el evento KeyDown del form coloca este código:

Código Delphi [-]
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if (key = VK_DOWN) then
    Image1.Top := Image1.Top + 1;
  if (key = VK_UP) then
    Image1.Top := Image1.Top - 1;
  if (key = VK_RIGHT) then
    Image1.Left := Image1.Left + 1;
  if (key = VK_LEFT) then
    Image1.Left := Image1.Left - 1;
end;

Esto te debería servir para empezar a investigar.
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita