Ignore:
Timestamp:
Jun 23, 2019, 12:36:19 AM (5 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DpiControls/Demo/UFormMain.pas

    r535 r537  
    1919    TrackBar1: TTrackBar;
    2020    procedure ButtonNewDpiFormClick(Sender: TObject);
     21    procedure FormDestroy(Sender: TObject);
    2122    procedure FormShow(Sender: TObject);
    2223    procedure Timer1Timer(Sender: TObject);
    2324    procedure TrackBar1Change(Sender: TObject);
    2425  private
    25 
     26    DpiForm: TDpiForm;
    2627  public
    2728    Redraw: Boolean;
     
    5152
    5253procedure TFormMain.ButtonNewDpiFormClick(Sender: TObject);
    53 var
    54   DpiForm: TDpiForm;
    5554begin
    5655  DpiForm := TDpiFormMain.Create(nil);
     
    5958  DpiForm.Show;
    6059  DpiScreen.Forms.Add(DpiForm);
     60end;
     61
     62procedure TFormMain.FormDestroy(Sender: TObject);
     63begin
     64  FreeAndNil(DpiForm);
    6165end;
    6266
Note: See TracChangeset for help on using the changeset viewer.