Ver Mensaje Individual
  #4  
Antiguo 04-01-2009
cmm07 cmm07 is offline
Miembro
 
Registrado: nov 2007
Posts: 526
Reputación: 19
cmm07 Va por buen camino
Hola, ya descubrí el código(que rapido soy ) para arriba y abajo, aqui está:

Código Delphi [-]
  public
    procedure Moviendo(var message:TWMWindowPosChanging); message WM_WINDOWPOSCHANGING;
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Moviendo(var message: TWMWindowPosChanging);
begin
  if message.WindowPos.x + self.Width >= screen.Width then
    message.WindowPos.x := screen.Width - self.Width
  else if message.WindowPos.x <= 0 then
    message.WindowPos.x := 0;


   if message.WindowPos.y + self.Height >= screen.Height then
    message.WindowPos.y := screen.Height - self.Height
  else if message.WindowPos.y <= 0 then
    message.WindowPos.y := 0;
end;

Por si se dan cuenta llega hasta el final de la pantalla pasando por debajo del Menú Inicio o Barras de tareas, ¿existe algo que el limite sea hasta el menú inicio?
Responder Con Cita