Je voudrais que, quand je redimensionne une form, le width soit égal à 75% du Height. Mais le problème, c'est que ce que j'ai mis ne marche pas :

code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
procedure TForm1.FormResize(Sender: TObject);
var oldWidth,oldHeight : integer;
begin
  if Width <> oldWidth then Width:=round(0.75*Height);
  if Height <> oldHeight then Height:=round(1.25*Width);
  oldWidth:=Width;
  oldHeight:=Height;
end;
Comment faire???