unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TMainForm = class(TForm) cbb1: TComboBox; procedure FormCreate(Sender: TObject); procedure cbb1Change(Sender: TObject); private { Private declarations } public { Public declarations } end;var MainForm: TMainForm;implementationuses Unit2, Unit3;{$R *.dfm}procedure TMainForm.FormCreate(Sender: TObject);var Form: TForm;begin cbb1.Clear;// Form := TForm2.Create(cbb1);// cbb1.AddItem(Form.Name, Form);// Form := TForm3.Create(cbb1);// cbb1.AddItem(Form.Name, Form); Form := TForm2.Create(cbb1); cbb1.AddItem(Form.Caption, Form); Form := TForm3.Create(cbb1); cbb1.AddItem(Form.Caption, Form); if cbb1.Items.Count > 0 then cbb1.ItemIndex := 0;end;procedure TMainForm.cbb1Change(Sender: TObject);begin if cbb1.ItemIndex >= 0 then begin if (cbb1.Items.Objects[cbb1.ItemIndex] is TForm) then TForm(cbb1.Items.Objects[cbb1.ItemIndex]).Show; end;end;end.给分!