如何解决A class named AClassName already exists的问题

guest |浏览570次
收藏|2014/05/21 20:39

看见Delphi盒子里面有人提问,我也来这里问下:

用主程序动态调用dll窗体,dll窗体中有edit,combobox,label,button,speedbutton,DBGridEh控件,主程序运行正常,就是动态调用dll产生子窗口时报 A class named TSizeGripeh already exists ,请问各位大神,有见过这问题吗

满意回答

2014/05/21 21:17




同样转载盒子里的答案:crystalmoon (crystalmoon)回答:

A class named AClassName already exists

http://www.devexpress.com/Support/Center/KB/p/A1994.aspxDescription

I'm working on a project which uses the ExpressQuantumGrid and ExpressBars. Some of the application's modules are built as DLLs. When I try to load a particular DLL an error occurs:

"A class named TdxStatusBarContainerControl already exists".

What am I doing wrong?

Solution

There is a strict rule that you should follow when compiling a DLL: You must compile both the main module and the DLLs with those runtime packages, which contain the classes used in both modules. In your case, you should include the ExpressQuantumGrid's and the ExpressBars' (the TdxStatusBarContainerControl component is a part of the ExpressBars) runtime packages to the list of runtime packages when compiling your application and DLLs. This way, everything will work fine.

NOTE: This approach requires you to deploy the corresponding runtime packages with your application.


意思就是叫你使用runtime packages的方式来解决问题,runtime packages可以达到内存共享

admin

其他回答(0)
0人关注该问题
待解决问题



+1
 加载中...