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); } }
public virtual void setSize(xBaseControl c) { setSize(c.getW(), c.getH()); }