本帖最后由 jackianroy 于 2009-10-16 10:41:44 编辑

解决方案 »

  1.   

    form.TransparentColor:=True;
    form.TransparentColorValue:=self.color;
    panel.parentcolor:=True;以上就是实现FORM和PANEL的透明化效果的..
    至于拖动就不知道了..没空看源码.
      

  2.   

    那我要是在Panel的后边放上图片呢,你这个也能实现透明化?
      

  3.   

    上边的代码仅仅局限于单一颜色(panel.parentcolor:=True;)也就是Form的颜色是什么,Panel的颜色就是什么,也就是说Panel并不透明,只是继承了Form的颜色而已
      

  4.   

    前两句是让form挖空实现透明,就是能看到form后面的东西 ,
    第三句是让panel也跟着form透明
      

  5.   

    但是这个不能实现只有panel透明..
      

  6.   

    事实上控件不是真正的透明,只是能拷贝下面画布的内容,放几个Button之类的就会被盖住了,至于什么原理,一时想不出,你可以装个编辑资源文件的工具研究研究
      

  7.   

    类似于XP的Themes资源而已,必须有一个Dll文件支撑。
    下面是XP的Themes资源xml文件,使用Microsoft.Windows.Common-Controls (Dll)服务画控件。<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <assemblyIdentity
    type="win32"
    name="Mao.Maozefa.Application"
    version="1.0.0.0"
    processorArchitecture="*"/>
      <dependency>
    <dependentAssembly>
      <assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Common-Controls"
    version="6.0.0.0"
    publicKeyToken="6595b64144ccf1df"
    language="*"
    processorArchitecture="*"/>
    </dependentAssembly>
      </dependency>
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
    <requestedExecutionLevel
      level="asInvoker"
      uiAccess="false"/>
      </requestedPrivileges>
    </security>
      </trustInfo>
    </assembly>