Chase,
Since you are using a StreamReader you can just close it and reopen it.
Or just pass in the name of the text file and always open the stream in
OnBeginPrint and close it in OnEndPrint where you can also clean up
allocated fonts that you use.
Allocate/open things in OnBeginPrint and clean up everything in
OnEndPrint and you should have a document that doesn't leak any resources
and where the Print method can be called without a problem.
Ron Allen
"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
Ok i have the override set up. I am using a streamreader to read a text
document, how do i reset the reader to the begining ofthefile.
Thank you,
Chase
"Ron Allen" wrote:
Chase,
The print button just calls Print again on the PrintDocument. You
need
to manage your datastream for the printing calls such that this resets
the
data stream position to the start of your data. Providing an override
for
OnBeginPrint is the standard way to do this.
Ron Allen
"Chase" <Ch***@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com... > The print preview dialog will display the preview of the document but
> will
> print a blank page when the print icon is clicked. Printing is fine
> otherwise. Can i set the print icon in the printpreviewdialog to go to
> the
> printdialog.