Ver Mensaje Individual
  #7  
Antiguo 21-04-2010
ioco ioco is offline
Miembro
 
Registrado: ene 2010
Posts: 42
Reputación: 0
ioco Va por buen camino
Quizá te sirva este código un poco modificado a lo que necesites hacer en tu programa:

Código Delphi [-]
procedure TForm1.FormDeactivate(Sender: TObject) ;
begin
   ReleaseCapture;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  If GetCapture = 0 then
    SetCapture(Form1.Handle) ;
  If PtInRect(Rect(Form1.Left,Form1.Top,Form1.Left + Form1.Width,Form1.Top + Form1.Height),
    ClientToScreen(Point(x, y))) then
    Begin
      { Cosas a hacer si el puntero del mouse está dentro del formulario } 
    end
  else
     Begin
       { Cosas a hacer si el puntero del mouse está fuera del formulario }
     end;
end;

Fuente: http://delphi.about.com/cs/adptips20...ltip0800_5.htm

Última edición por ioco fecha: 21-04-2010 a las 18:35:02.
Responder Con Cita