zoukankan      html  css  js  c++  java
  • PPC开发,窗体添加背景图片

    其实很简单首先添加背景图片到所在工程,设置为嵌入式资源。接着获取嵌入式图片资源,覆写OnPaint绘制背景。
    private Image bgImage;
    public FormBase()
            
    {
                bgImage
    = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("CMclient.Image.Img_BackGround.gif"));
            }

    //绘制背景
            protected override void OnPaint(PaintEventArgs e)
            
    {
                
    base.OnPaint(e);
                e.Graphics.DrawImage(bgImage, 
    this.ClientRectangle, new Rectangle(00this.bgImage.Width, this.bgImage.Height), GraphicsUnit.Pixel);
            }
  • 相关阅读:
    jquery新知识
    jquery回顾
    Filter和Listener
    jsp,jstl,el
    cookie和session
    servlet和HTTP原理
    xml基本知识
    linux 相关操作
    linux mysql 相关操作、问题
    linux 文件结构
  • 原文地址:https://www.cnblogs.com/datong/p/1156617.html
Copyright © 2011-2022 走看看