• 容器透明(如PictureBox)


    一次做个小小的程序,在一个小小的问题上卡壳了,就是这个关于容器透明的问题。我要达到的目的是这样的:PictureBox上放一张透明的GIF图片,我要PictureBox在GIF图片透明的部分透明,主要是因为我在PictureBox下面还有其他图像,这样如果GIF图片透明的部分不透明就会是一块方块状的容器,显示特别难看。然而查一般情况下做为容器的控件不具有BackStyle这样的属性,而Label,Image等这样的控件都是有的。这里贴出代码和大家分享。VB6代码,Google搜索所得,没仔细看也看不懂,我只知道怎么用。用法如下:
    Dim TempCls As clsTransForm
    Set TempCls = New clsTransForm
    TempCls.ShapeMe RGB(255, 255, 255), True, , PictureBox1
    这样PictureBox1容器就透明了,当然PictureBox1的背景颜色最好也设置成和RGB(255, 255, 255)这个参数一样的颜色,具体参数是什么意义请看代码中的具体说明。
    下面是这个类模块中的代码:
    clsTransForm
  • 相关阅读:
    java的(PO,VO,TO,BO,DAO,POJO)解释
    java中的几种对象(PO,VO,DAO,BO,POJO)
    mybatis如何根据mapper接口生成其实现类
    MyBatis接口的简单实现原理
    Fast-settling synchronous-PWM-DAC filter has almost no ripple
    CMOS DACs act as digitally controlled voltage dividers
    Programmable current source requires no power supply
    Add margining capability to a dc/dc converter
    Use an LM317 as 0 to 3V adjustable regulator
    Simple microcontroller-temperature measurement uses only a diode and a capacitor
  • 原文地址:https://www.cnblogs.com/Tangf/p/367885.html
Copyright © 2020-2023  润新知