//以下是实现对Form体的动态改变
FormE1->Caption="密码管理";
Label1->Font->Size=16;
Label2->Font->Size=8;
Label3->Font->Size=Label2->Font->Size;
Label4->Font->Size=Label2->Font->Size;
//
AnsiString LT[]={"密码权限管理:","人员姓名:","权限等级:","密码:"};
AnsiString BT[]={"增加","删除","修改","取消"};
AnsiString TLString("TLabel");
AnsiString TBString("TButton");
TLabel *Lab;
TButton *Bt;
for(int i=0;i<ComponentCount;i++){
if (Components[i]->ClassNameIs(TLString)){
Lab=(TLabel *)Components[i];
Lab->Caption=LT[i];
}
if(Components[i]->ClassNameIs(TBString)){
Bt=(TButton *)Components[i];
Bt->Caption=BT[i];
}
}