这段代码会弹出两个窗体,应该如何修改呢?
unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, Menus,U_Myinterface;//在工程加入U_Myinterface这个unit,让exe也和bpl使用同一个接口。typeTmain = class(TForm) MainMenu1: TMainMenu; N1: TMenuItem; bpl1: TMenuItem; procedure bpl1Click(Sender: TObject);private { Private declarations }public { Public declarations } my:Myinterface;end;varmain: Tmain;implementation{$R *.dfm}procedure Tmain.bpl1Click(Sender: TObject);varhModule: THandle;frm:TForm;beginhModule := LoadPackage('Plabel.bpl'); //动态载入包frm:=TForm(TComponentClass(FindClass('Tform1')).Create(Application)); //创建form,frm.ShowModal; //show出来,如果需要用MDI方式,只需要把form的formstyle改了,然后用下面的代码即可my:=TComponentClass(FindClass('Tform1')).Create(Application) as Myinterface; //转化为接口my.show123('11'); //调用接口函数 end;end.