0
我正在使用下面的代碼來捕獲和打印窗體。問題是它打印出來非常模糊。有什麼辦法讓它打印更清晰?如何在屏幕截圖後避免模糊打印?
Imports System.Drawing.Printing
Public bmp1 As Bitmap
Private WithEvents printDocument1 As New PrintDocument
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim L, T, W, H As Integer
L = form1.Left : T = form1.Top : W = form1.Width : H = form1.Height
Dim Bmp0 As New Bitmap(W, H)
Dim g0 As Graphics = Graphics.FromImage(Bmp0)
g0.CopyFromScreen(L, T, 0, 0, New Size(W, H))
g0.Dispose()
bmp1 = New Bitmap(Bmp0, 750, 562)
printDocument1.Print()
End Sub
Private Sub printDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printDocument1.PrintPage
e.Graphics.DrawImage(bmp1, 0, 0)
End Sub
位圖如何在'.Print()'之前查看?也許打印機正在模糊它? – bzlm
[Bitmap.Height和VerticalResolution之間的差異]的可能重複(http://stackoverflow.com/questions/6221359/difference-between-bitmap-height-and-verticalresolution) –
壞墨盒? – N0Alias