Multiple forms in delphi

后端 未结 3 1486
长情又很酷
长情又很酷 2021-01-01 08:08

In my Delphi Project i want to have a \'Settings\' button that when clicked, opens a second form (i think this is the correct term, i essentially want a new window to open)

3条回答
  •  爱一瞬间的悲伤
    2021-01-01 08:24

    I would create a Settings Objects in form1 and send it to form 2:

    TSettings = class 
    private    
      FPropA: integer;   
      FPropB: string; 
    published 
      property PropA: integer read FPropA write FPropA:  
      property PropB: string read FPropB write FPropB: 
    end;
    
    ...
    form2.EditSettings(ASettings);
    

提交回复
热议问题