简体   繁体   中英

Printing a c# winform application form

I'm amazed how difficult this seems to be. I 'just' want to print my form (it's an invoice), and ensure it prints the whole form (not just what is displayed on the screen)? I can alter anything I want on the form itself..so how do I set it all up so it prints perfectly to a standard letter sized sheet of paper, and doesn't let the user resize it, etc etc. They should see it just like it will print.. maybe they can zoom in and out, but no re-sizing, etc.

I thought a reportviewer control would be handy in order to handle all the printing and sizing stuff.. but that control doesn't seem to lend itself to a single record display. (maybe have a Header as the entire report! seems crazy)

so unless i'm wrong, maybe someone can just give me all the properties to set, etc, in order to make a regular form statically sized for a standard sheet of paper (8.5 x 11)? And then show me the way to print the entire thing rather then just a 'printscreen'.

I've read a bunch of ideas for using 'printscreen' and using GDI+ (i didn't fully understand how I could use that).. nothing seems to be standing out for me.

I'd recommend the report viewer and rdlc report. You can use it just fine for only one record, and you can include a subreport for the invoices line items. No need to have everything in the header.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM