zoukankan      html  css  js  c++  java
  • WinFrom透明Label

            //构造函数

            public from1()
            {
                InitializeComponent();
                SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            }

          //图片框重绘函数

            private void pictureBox2_Paint(object sender, PaintEventArgs e)
            {
                foreach (Control c in this.Controls)
                {
                    if (c is Label)
                    {
                        Label l = (Label)c;
                        l.Visible = false;
                        e.Graphics.DrawString(l.Text, l.Font, new SolidBrush(l.ForeColor), l.Left - pictureBox2.Left, l.Top - pictureBox2.Top);
                    }
                }
            }

  • 相关阅读:
    poj 2000
    poj1316
    poj1922
    poj2017
    poj1833 排列
    poj1338
    poj2136
    poj2242
    IE兼容html5标签
    绑定事件后,某些情况下需要解绑该事件
  • 原文地址:https://www.cnblogs.com/qzbnet/p/1415541.html
Copyright © 2011-2022 走看看