By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,694 Members | 1,320 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,694 IT Pros & Developers. It's quick & easy.

Printing a .dat file

P: n/a
i have created a .dat file using a streamwriter and am having troubles
recalling the file for printing to a receipt. I know to use a
printDialog and a PrintDocument, but how do i set the printDocument to
the document i want?

Any insight would help

Feb 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<ba**********@gmail.com> schrieb:
i have created a .dat file using a streamwriter and am having troubles
recalling the file for printing to a receipt. I know to use a
printDialog and a PrintDocument, but how do i set the printDocument to
the document i want?


What data does the DAT file contain? You'll have to handle the print
document's 'PrintPage' event, draw the data to be printed onto the page
there ('e.Graphics.DrawString', 'e.HasMorePages') and start printing by
calling the print document's 'Print' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 10 '06 #2

P: n/a
Thanks for the help. I was able to take what you said and find other
examples. Thanks

Feb 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.