L
louqing_2
Unregistered / Unconfirmed
GUEST, unregistred user!
我的BPL中的窗体是用一个函数来调用的,这个函数是查找类再创建的,有没有办法给这个BPL中的窗体赋值?如果是数字的画到好办,可以用SENDERMESSAGE,可不可以直接调用这个窗体的中的属公有变量?可以要怎么做?
我的代码如下:
function CreateFormByClassName2(const ClassName: string;VMainFromHwnd:Hwnd): TCustomForm;
var
AClass: TPersistentClass;
vmainform:TCustomForm;
begin
{ Note that TApplication "owns" this form and thus it must be freed prior
to unloading the package }
AClass := GetClass(ClassName);
if AClass <> nil then
begin
vmainform:= TComponentClass(AClass).Create(Application) as TCustomForm;
vmainform.ParentWindow := VMainFromHwnd;
vmainform.WindowState := wsMaximized;
Result :=vmainform ;
end
else
raise Exception.CreateFmt(sErrorCreateForm, [ClassName]);
end;
vmainform这个返回的窗体有没有办法给他自定义属性或者用全局变量?
帮我一下吧,包中的问题怎么怎么多?
我的代码如下:
function CreateFormByClassName2(const ClassName: string;VMainFromHwnd:Hwnd): TCustomForm;
var
AClass: TPersistentClass;
vmainform:TCustomForm;
begin
{ Note that TApplication "owns" this form and thus it must be freed prior
to unloading the package }
AClass := GetClass(ClassName);
if AClass <> nil then
begin
vmainform:= TComponentClass(AClass).Create(Application) as TCustomForm;
vmainform.ParentWindow := VMainFromHwnd;
vmainform.WindowState := wsMaximized;
Result :=vmainform ;
end
else
raise Exception.CreateFmt(sErrorCreateForm, [ClassName]);
end;
vmainform这个返回的窗体有没有办法给他自定义属性或者用全局变量?
帮我一下吧,包中的问题怎么怎么多?