PictureBox PaintEvent与其他方法
private Bitmap Circle() { Bitmap bmp; Graphics gfx; SolidBrush firca_dis=new SolidBrush(Color.FromArgb(192,0,192)); bmp = new Bitmap(40, 40); gfx = Graphics.FromImage(bmp); gfx.FillRectangle(firca_dis, 0, 0, 40, 40); return bmp; }
private void pictureBox2_Paint(object sender, PaintEventArgs e) { Graphics gfx= Graphics.FromImage(Circle()); gfx=e.Graphics; }
冉冉说
相关分类