using System.ComponentModel; using System.Windows.Forms; namespace Dongke.WinForm.Controls.InvoiceLayout { [ToolboxItem(false)] internal partial class PaperBox : UserControl { #region 构造函数 /// /// 构造函数 /// public PaperBox() { InitializeComponent(); AutoScroll = true; AutoScrollMargin = new System.Drawing.Size(LayoutConsts.LAYOUT_MARGIN, LayoutConsts.LAYOUT_MARGIN); BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint , true); } #endregion 构造函数 #region 函数 protected override System.Drawing.Point ScrollToControl(Control activeControl) { return DisplayRectangle.Location; } #endregion 函数 } }