Ver Mensaje Individual
  #2  
Antiguo 02-05-2005
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.286
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
Puedes utilizar las API's GetCursorPos y SetCursorPos.
Un ejemplo sencillo puedes verlo con ésto; Crea un form nuevo y en el evento FormKeyDown coloca el siguiente código:

Código Delphi [-]
 procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
 var
   pt:TPoint;
 begin
   // Posicion actual
   GetCursorPos(pt);
 
   // Segun la tecla movemos....
   if key = VK_UP then begin  // arriba
     SetCursorPos(pt.x, pt.y - 1);
   end
   else if key = VK_DOWN then begin // abajo
     SetCursorPos(pt.x, pt.y + 1);
   end
   else if key = VK_LEFT then begin // izquierda
     SetCursorPos(pt.x - 1, pt.y);
   end
   else if key = VK_RIGHT then begin  // derecha
     SetCursorPos(pt.x + 1, pt.y);
   end;
   // procesar mensajes en cola
   Application.ProcessMessages;
 end;
__________________
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