mobile屏幕闪烁问题

1.用二级缓存

gxBuffer = Graphics.FromImage(offBitmap); gxBuffer.Clear(Color.Navy); gxBuffer.DrawImage(background, new Rectangle(0,0, background.Width, background.Height), 0, 0, background.Width, background.Height, GraphicsUnit.Pixel, new ImageAttributes()); e.Graphics.DrawImage(offBitmap, 0, 0);

2.而且要重写OnPaintBackground方法

protected override void OnPaintBackground(PaintEventArgs e) { //base.OnPaintBackground(e); }

你可能感兴趣的:(mobile屏幕闪烁问题)