Muchas Gracias Neftali.. voy a bajar tu ejemplo para verlo... te comento que realice el método que me dijo coso y no es exactamente lo que tenía en mente, o sea, la segunda ventana se mueve a una posicion con respecto a la primera, pero cuando suelto el boton..
de todos modos seguí renegando y encontré algunas cosas que no eran para este fin pero lo pude adaptar y anda perfectamente ...
acá les dejo el código de dos métodos para los que tengan el mismo problema que yo...
Método 1:
Código Delphi
[-]
....
....
var
XX, YY : Intgeger;
ButtonPress : Boolean;
CursorPos : TPoint;
....
...
Procedure TForm1.FormMouseDown (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
XX := X;
YY := Y;
ButtonPress := True;
end;
Procedure TForm2.FormMouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
if ButtonPress then
begin
GetCursorPos (CursorPos);
Top := CursorPos.Y - YY;
Left := CursorPos.X - XX;
OtroForm.Top := Top + Height;
OtroForrm.Left := Left
end;
end;
Procedure TForm1.FormMouseUp (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ButtonPress := False;
end;
Método 2: Escrito por Roman en alguna oportunidad.
Código Delphi
[-]
interface
type
TForm1 = class(TForm)
private
procedure WMMove(var Message: TWMMove); message WM_MOVE;
end;
implementation
procedure TForm1.WMMove(var Message: TWMMove);
begin
inherited;
if Assigned(Form2) then
begin
Form2.Left := Left;
Form2.Top := Top + Height;
end;
end;
end.