if you don't need the use of the bitmap, you can discard it. You have redundant directory operations where you set the current directory, to the current directory. Graphics object disposal inside the
PrintWindow
function may not be necessary immediately after using it. The using statement will already dispose of it once it goes out of scope. Explicitly calling
gfxBmp.Dispose()
can be removed. Saving to a JPEG or PNG is generally faster than saving as a TIFF since it usually results in larger sizes. This question really belons in codereview. —
Abraham Zinala 5 secs ago