我写的代码如下,我得到这个错误:
A generic error occurred in GDI+
protected void btnSave_Click(object sender, EventArgs e)
{
Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);
graphics.CopyFromScreen(100, 0, 0, 0, bitmap.Size);
bitmap.Save("@file.bmp");
}