0
private void bt_saveImage_Click(object sender, System.EventArgs e)   
{
   using (Bitmap printImage = new Bitmap(tlp.Width, tlp.Height))
   {
       tlp.DrawToBitmap(printImage, new Rectangle(0, 0, printImage.Width, printImage.Height));                   
       printImage.Save( "C:/image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg);
   }              
   throw new System.NotImplementedException();       
} 

「ExternalExceptionは処理されません。GDI+で一般的なエラーが発生しました」というエラーがあります。"printImage.Save( "C:/image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg)「_

手伝ってくれてありがとう!

4

1 に答える 1

0

「C:\image.jpg」の前に @ を使用

printImage.Save( @"C:\image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg)

また

場所に「\\」を使用

printImage.Save( "C:\\image.jpg",System.Drawing.Imaging.ImageFormat.Jpeg)
于 2012-08-21T12:53:11.373 に答える