12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace ProjectBase.Controls
- {
- public partial class NewPanel : Panel
- {
- public NewPanel()
- {
- InitializeComponent();
- this.DoubleBuffered = true;
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
- }
- public NewPanel(IContainer container)
- {
- container.Add(this);
- InitializeComponent();
- this.DoubleBuffered = true;
- SetStyle(ControlStyles.UserPaint,true);
- SetStyle(ControlStyles.AllPaintingInWmPaint,true);
- SetStyle(ControlStyles.OptimizedDoubleBuffer,true);
- }
- protected override void OnPaint(PaintEventArgs pe)
- {
- base.OnPaint(pe);
- }
- }
- }
|