private Image myImage = Image.FromFile("d:/1.gif");
public Graphics g;
private void set_Click(object sender, EventArgs e)
{
int width = Convert.ToInt32(width_T.Text);
int height = Convert.ToInt32(height_T.Text);
this.BackColor = Color.White;
if (width > 290 | height > 270)
{
MessageBox.Show("height or width too large");
return; }
g.Clear(this.BackColor);
g.DrawImage(myImage, 5, 5, width, height);
}
g.Clear(this.BackColor);////未将对象引用设置到对象的实例。????
public Graphics g;
private void set_Click(object sender, EventArgs e)
{
int width = Convert.ToInt32(width_T.Text);
int height = Convert.ToInt32(height_T.Text);
this.BackColor = Color.White;
if (width > 290 | height > 270)
{
MessageBox.Show("height or width too large");
return; }
g.Clear(this.BackColor);
g.DrawImage(myImage, 5, 5, width, height);
}
g.Clear(this.BackColor);////未将对象引用设置到对象的实例。????
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货