zoukankan      html  css  js  c++  java
  • 透明背景

    绘制背景透明的图片,在有背景色的Form上显示透明图片,这是.NET CF本身提供的方法,关键是最后一个参数。

    //在有背景色的Form上显示透明图片(事先准备背景透明的图片)
            private void Form1_Paint(object sender, PaintEventArgs e)
            {
                Assembly asm = Assembly.GetExecutingAssembly();
                Bitmap backgroundImage = new Bitmap(asm.GetManifestResourceStream("MyControl.TransparentImg.13.png"));

                ImageAttributes attr = new ImageAttributes();
                attr.SetColorKey(backgroundImage.GetPixel(0, 0), backgroundImage.GetPixel(0, 0));


                e.Graphics.DrawImage(backgroundImage, new Rectangle(5, 5, 256, 256), 0, 0, 256, 256, GraphicsUnit.Pixel, attr);
            }

  • 相关阅读:
    linux三剑客
    linux用户权限
    linux文件权限
    linux目录配置
    linux命令(持续更新)
    linux外置命令
    linux日常操作指令
    晨雾

    CAPTCHA--验证码
  • 原文地址:https://www.cnblogs.com/xyzlmn/p/3168447.html
Copyright © 2011-2022 走看看