Esempio n. 1
0
        private void DrawpictureBox2()
        {
            Bitmap   bmp = new Bitmap(pictureBox2.Width, pictureBox2.Height);
            Graphics g   = Graphics.FromImage(bmp);

            //Graphics g = pictureBox1.CreateGraphics();//画布
            MyDraw.DrawNewBoxes(g, newbox);
            this.pictureBox2.CreateGraphics().DrawImage(bmp, 0, 0);
        }
Esempio n. 2
0
        private void DrawpictureBox1()
        {
            Bitmap   bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            Graphics g   = Graphics.FromImage(bmp);

            //Graphics g = pictureBox1.CreateGraphics();//画布
            MyDraw.DrawBackground(g, background);
            MyDraw.DrawBoxes(g, box);
            this.pictureBox1.CreateGraphics().DrawImage(bmp, 0, 0);
        }