PaperBox.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System.ComponentModel;
  2. using System.Windows.Forms;
  3. namespace Dongke.WinForm.Controls.InvoiceLayout
  4. {
  5. [ToolboxItem(false)]
  6. internal partial class PaperBox : UserControl
  7. {
  8. #region 构造函数
  9. /// <summary>
  10. /// 构造函数
  11. /// </summary>
  12. public PaperBox()
  13. {
  14. InitializeComponent();
  15. AutoScroll = true;
  16. AutoScrollMargin = new System.Drawing.Size(LayoutConsts.LAYOUT_MARGIN, LayoutConsts.LAYOUT_MARGIN);
  17. BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
  18. SetStyle(ControlStyles.OptimizedDoubleBuffer
  19. | ControlStyles.ResizeRedraw
  20. | ControlStyles.AllPaintingInWmPaint
  21. , true);
  22. }
  23. #endregion 构造函数
  24. #region 函数
  25. protected override System.Drawing.Point ScrollToControl(Control activeControl)
  26. {
  27. return DisplayRectangle.Location;
  28. }
  29. #endregion 函数
  30. }
  31. }