Пример #1
0
        public RazorBitmapForm()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.DoubleBuffer, false);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.Opaque, true);

            SimpleParticlesWorld.Size = this.ClientSize;

            this.razorBitmap = new RazorBitmap(this.CreateGraphics()) { Size = this.ClientSize };
            this.Disposed += (sender, e) => this.razorBitmap.Dispose();
            this.Form_SizeChanged(this, EventArgs.Empty);
        }
Пример #2
0
        public RazorBitmapForm()
        {
            InitializeComponent();

            this.SetStyle(ControlStyles.DoubleBuffer, false);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.Opaque, true);

            SimpleParticlesWorld.Size = this.ClientSize;

            this.razorBitmap = new RazorBitmap(this.CreateGraphics()) { Size = this.ClientSize };
            this.Disposed += (sender, e) => this.razorBitmap.Dispose();
            this.Form_SizeChanged(this, EventArgs.Empty);
        }