www.pudn.com > sudoku.rar > NoFlickerPanel.cs
//--------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: NoFlickerPanel.cs
//
// Description: A double-buffering and redraw-on-resizing panel.
//
//--------------------------------------------------------------------------
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Microsoft.Sudoku.Controls
{
/// A derived panel that uses double buffering to prevent flicker.
[ToolboxBitmap(typeof(Panel))]
internal class NoFlickerPanel : Panel
{
/// Initializes the panel.
public NoFlickerPanel()
{
SetStyle(
ControlStyles.DoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.ResizeRedraw |
ControlStyles.SupportsTransparentBackColor, true);
}
}
}