C# Print long height form with printform component
How can i print a form that h开发者_JAVA技巧as height more than screen height (form has vertical scroll)?
PrintForm only supports printing an exact copy of what you see on the screen. The print-out will have a visible scrollbar as well. And of course not show the controls that are scrolled out of view.
There's an excellent workaround for this, use the PrintDocument component. The print-out will look much better as well, not the grainy bitmap you get out of PrintForm. You do however have to write the code for the PrintPage event handler yourself. A fair amount of code, but it isn't hard code. Use PrintPreviewDialog so that you don't waste a tree debugging and fine-tuning your code.
精彩评论