1、进入Component -> Install Package
2、找到ExpressSkin开头的那些包。这些包就是DEV的SKIN包,把不用包REMOVE掉,只留下需要的SKIN包
3、打开项目,把之前自动添加的SKIN单元引用全部删掉
4、重新编译
5、去看看DLL的体积,然后开始偷笑分析:  大家都知道想让控件自动给当前单元增加其它单元的引用,是可以在控件包里写代码实现的。怀疑新版DEV是通过注册的方式来注册SKIN的,因此原来全部SKIN包都加载的时候,编译时就会添加上全部SKIN的单元引用。把不用的SKIN包删掉后,自然就只会添加这些剩下的SKIN包中所需的单元了(同时可以看到CX控件的SKINNAME也只能选留下的那些SKIN了),从而减少了编译的体积。

解决方案 »

  1.   

    OTL... 被置顶了...再补充个比REMOVE PACKAGE更方便点的方法:毕竟要靠这种方法来解决问题,本身就是比较麻烦的,也反映了DEV设计上的一些问题。主要麻烦来源于不同项目切换时,如果用的SKIN不同,就要经常把SKIN包装来装去卸来卸去。但是如果不REMOVE,只是在INSTALL PACKAGE那里把钩去掉的话,重开DELPHI时,这些包是会被恢复加载的。要解决这个问题,我们可以用过禁用的方法,来禁止这些包加载,有需要的包才钩上。打开DELPHI的注册表,“HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Disabled Packages”中记录的就是要禁用的包,我们只需要把要禁用SKIN包都添加进去就行了。我们可以做个Reg文件来完成这项工作:Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Disabled Packages]
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinBlackD7.bpl"="ExpressSkins - Black Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinBlueD7.bpl"="ExpressSkins - Blue Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinSilverD7.bpl"="ExpressSkins - Silver Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinStardustD7.bpl"="ExpressSkins - Stardust Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinValentineD7.bpl"="ExpressSkins - Valentine Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinXmas2008BlueD7.bpl"="ExpressSkins - Xmas2008Blue Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinCaramelD7.bpl"="ExpressSkins - Caramel Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinCoffeeD7.bpl"="ExpressSkins - Coffee Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinGlassOceansD7.bpl"="ExpressSkins - GlassOceans Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkiniMaginaryD7.bpl"="ExpressSkins - iMaginary Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinMcSkinD7.bpl"="ExpressSkins - McSkin Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinLilianD7.bpl"="ExpressSkins - Lilian Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinLiquidSkyD7.bpl"="ExpressSkins - LiquidSky Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinLondonLiquidSkyD7.bpl"="ExpressSkins - LondonLiquidSky Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinMoneyTwinsD7.bpl"="ExpressSkins - MoneyTwins Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinOffice2007BlackD7.bpl"="ExpressSkins - Office2007Black Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinOffice2007BlueD7.bpl"="ExpressSkins - Office2007Blue Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinOffice2007GreenD7.bpl"="ExpressSkins - Office2007Green Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinOffice2007PinkD7.bpl"="ExpressSkins - Office2007Pink Skin by Developer Express Inc."
    "C:\\Program Files\\Borland\\Components\\Developer Express Inc V36\\Library\\Delphi7\\dxSkinOffice2007SilverD7.bpl"="ExpressSkins - Office2007Silver Skin by Developer Express Inc."
    注意把路径替换成你自己的本地路径,然后从里面剔除自己需要的SKIN包的注册表项即可。
      

  2.   

    打包一个什么呢?DEV?REG文件?
      

  3.   

    其实dev的help里已经有说明了,添加皮肤时会自动添加引用的单元,但是如果要取消某一皮肤,除了取消选择项外,需要手动删除各单元里的引用,不会自动删除
      

  4.   


    正在使用DEV的skin,确实如此。。这样算是一个巧方法
      

  5.   

     我用的DEV。强烈顶!!!~~~
      

  6.   

    dev功能强大,体积也大
    已经不用dev 了
      

  7.   

    如果您有一技之长,请到淘师宝发帖子收徒弟; 如果您想学习一门技能,请到淘师宝发帖子拜师傅; 拜师傅,收徒弟,到淘师宝,网址:www.taoshibao.com 
      

  8.   

    补充下,今天上网下查了下,说V40以上,在PROJECT菜单下会多了个"MODIFY SKIN OPTIONS"的选项,可以进行设置;另外动态加载SKIN也可以解决这个问题。
      

  9.   

    安装Dev的时候,不安装SKIN不就可以了。
      

  10.   

    DEV 是我这几年研究的方向。
    我以为,要解决这个话题没必要这么复杂。
    1、project/ modify skin options /2个勾去掉
    2、删掉 unit 中 但凡带 skin 的引用。如果需要skin,可以
    http://blog.sina.com.cn/s/blog_40ac71670100gzrx.html
    5d博客
    (可惜,博客中写的其实不完善,还有一种没来得及写上去)
    @_#
      

  11.   


    呵呵,我匆匆忙忙的回复的,没来得及看中间的内容。
    Harry,这个是一篇非常精辟的文章,
    我个人建议
    1、先把这个帖子结了。
    2、新开一个帖子,把你所有的内容都放到#1楼
    这样,偶们可以拿来收藏哈。
    :)
      

  12.   

    skin当然要动态载入,不仅仅是体积的问题,
    在外部添加删除都比较方便
      

  13.   

    谁有cxdbtreeview的使用说明吗?帮忙发我邮箱[email protected] 谢谢啦!