當前位置:編程學習大全網 - 網站源碼 - 用C#打印窗體只能畫到位圖上嗎?這樣會失真啊~ 請問打印窗體有沒有什麽好的方法?

用C#打印窗體只能畫到位圖上嗎?這樣會失真啊~ 請問打印窗體有沒有什麽好的方法?

bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);

gfxScreenshot = Graphics.FromImage(bmpScreenshot);

gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);

bmpScreenshot.Save(saveScreenshot.FileName, ImageFormat.Emf);

例子:

/KB/graphics/cscapturescreen1.aspx

/KB/cs/TeboScreen.aspx

  • 上一篇:淘寶旺旺在任務欄怎麽設置隱藏圖標
  • 下一篇:python怎麽能快速掌握?
  • copyright 2024編程學習大全網