Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > OOP
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 24-12-2006
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Poder: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Extraño requerimiento pero puedes intentarlo interceptando el mensaje WM_MOVING del formulario hijo:

Código Delphi [-]
type
  TForm2 = class(TForm)
  private
    procedure WMMoving(var Msg: TWMMoving); message WM_MOVING;
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

{ TForm2 }

procedure TForm2.WMMoving(var Msg: TWMMoving);
var
  DragWidth: Integer;
  DragHeight: Integer;

begin
  inherited;

  DragWidth := Msg.DragRect.Right - Msg.DragRect.Left;
  DragHeight := Msg.DragRect.Bottom - Msg.DragRect.Top;

  with Msg, Application.MainForm do
  begin
    if DragRect.Left - 2 <= ClientOrigin.X then
    begin
      DragRect.Left := ClientOrigin.X + 2;
      DragRect.Right := ClientOrigin.X + DragWidth + 2;
    end;

    if DragRect.Right + 2 > ClientOrigin.X + ClientWidth then
    begin
      DragRect.Left := ClientOrigin.X + ClientWidth - DragWidth - 2;
      DragRect.Right := ClientOrigin.X + ClientWidth - 2;
    end;

    if DragRect.Top - 2 <= ClientOrigin.Y then
    begin
      DragRect.Top := ClientOrigin.Y + 2;
      DragRect.Bottom := ClientOrigin.Y + DragHeight + 2;
    end;

    if DragRect.Bottom + 2 > ClientOrigin.Y + ClientHeight then
    begin
      DragRect.Top := ClientOrigin.Y + ClientHeight - DragHeight - 2;
      DragRect.Bottom := ClientOrigin.Y + ClientHeight - 2;
    end;
  end;
end;

Claro que tendrías que hacer lo mismo para cada formulario hijo, o bien hacerlo para un formulario hijo base y heredar todos los demás de ése.

// Saludos
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Formularios Caro OOP 1 20-10-2005 17:37:50
Formularios Caro Varios 2 19-08-2005 17:58:54
Formularios Caro Varios 5 14-07-2005 14:51:30
Formularios MDI y SDI (VIH)Lestat Conexión con bases de datos 2 18-06-2005 00:18:44
formularios mdi tango01 OOP 22 19-11-2003 16:27:34


La franja horaria es GMT +2. Ahora son las 16:50:11.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi