Ver Mensaje Individual
  #2  
Antiguo 15-03-2008
Avatar de ixMike
ixMike ixMike is offline
Miembro
 
Registrado: feb 2004
Posts: 1.151
Reputación: 24
ixMike Va por buen camino
Lo que pasa es que no mandas dibujar a la imagen hasta que se suelta:

Código Delphi [-]
procedure TForm1.o10MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
 var OrgFormPoint, CurCursorPoint, OrgCursorPoint: TPoint;
begin
 OrgFormPoint.X := o10.Left; 
 OrgFormPoint.Y := o10.Top;
 GetCursorpos(OrgCursorPoint);
 While (GetAsyncKeystate(VK_LBUTTON) <> 0) do
   begin
   GetCursorpos(CurCursorPoint);
   o10.Left := OrgFormPoint.X - OrgCursorPoint.X + CurCursorPoint.X;
   o10.Top := OrgFormPoint.Y - OrgCursorPoint.Y + CurCursorPoint.Y;
   Repaint; //Te falta esta línea
   end;
end;


Salu2


Edito: En vez de redibujar la imagen, has de redibujar todo el Form, ya que sino queda un "rastro".

Última edición por ixMike fecha: 15-03-2008 a las 20:27:42.
Responder Con Cita