Einzelnen Beitrag anzeigen

phire_

Registriert seit: 3. Apr 2007
2 Beiträge
 
#7

Re: Formgröße proportional ändern

  Alt 28. Jul 2008, 00:14
Danke Muetze1

das Stichwort SetBounds() hat mir geholfen!

Hier ein guter Link dazu: http://www.bsdg.org/SWAG/DELPHI/0076.PAS.html

Edit:

Also ich habe es jetzt so gemacht:

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
  private
  public
    procedure SetBounds(aLeft, aTop, aWidth, aHeight: Integer); override;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.SetBounds(aLeft, aTop, aWidth, aHeight: Integer);
begin
  aWidth := Round((4/3)*aHeight);
  inherited SetBounds(aLeft, aTop, aWidth, aHeight);
end;

end.
Das funktionier jedoch nicht. es ist wie vorher.
hoffe auf hilfe

mfg
  Mit Zitat antworten Zitat