PictureBox PaintEvent與其他方法我的表單中只有一個(gè)PictureBox,我想在這個(gè)PictureBox上畫一個(gè)方法,但是我不能這樣做,不能工作。方法是: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;
}
請(qǐng)教PictureBox PaintEvent與其他方法
猛跑小豬
2019-08-02 07:02:25