示例#1
0
        protected override void OnPaintBackground(PaintEventArgs pevent)
        {
            //  ThuyPS: avoiding flickering technique
            if (mBaseControl != null && mDoubleBuffer)
            {
                if (offScreenBmp == null)
                {
                    offScreenBmp = new Bitmap(mBaseControl.getW(), mBaseControl.getH());
                    offScreenDC  = Graphics.FromImage(offScreenBmp);

                    offG = new xGraphics();
                    offG.setGraphics(offScreenDC);
                }
                //  background
                offG.getGraphics().Clear(this.BackColor);

                //  render
                mBaseControl.render(offG);
            }
            else
            {
                base.OnPaintBackground(pevent);
            }
        }
示例#2
0
 public virtual void setSize(xBaseControl c)
 {
     setSize(c.getW(), c.getH());
 }