能否循环从form1到form55设置formXX.font=FontDialog1.font吗?

解决方案 »

  1.   

    你是不是想问通过名称找对象的。
    Indicates whether a given component is owned by the component.function FindComponent(const AName: string): TComponent;DescriptionFindComponent returns the component in the Components property array with the name that matches the string in the AName parameter. Use FindComponent to determine whether a given component is owned by another.TForm(FindComponent('Form1')).font:=.....未经验证。
      

  2.   

    懂得面象对象编程的人,会觉得这是一个非常容易的事.1. create 一个base form.
    2. 添加一个method用来设置font.
    3. 或在onshow是自动设置font
    3. 设置font时保证font 是一个const或者全局变量.
    4. 需要变时变更const或全局变量就可以了