Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a windows form with lables, tables and textboxes, it looks like an invoice.
im trying to find any funktion to print out the form as it is, it will look like as an invoice.
or another idea is to fins any funktion to export the tabels filles with data to a pdf file that i can print out
Posted
Comments
Joan M 14-Sep-12 11:05am    
Have you tried anything? are you stuck in any specific issue? we won't give you the code for any of those two things, it is not our way to do things here and moreover your question is too general...

Use the green link "Improve question" that is just under your question to improve it, add more detail and we will be able to help.

You can check these[^] for help in general printing, and there are plenty of PDF print drivers available. You can also investigate using one of the free libraries such as iTextSharp[^] for creating PDF direct.
 
Share this answer
 
Hello,

You can do that in C# using the Visual Basic Power Packs.

http://msdn.microsoft.com/en-us/vstudio//bb735936.aspx[^]

The Visual Basic Power pack will add a new group in your toolbox, just drag a PrintForm control on your form.

To print is is very easy :

printForm1.Print(this, PrintForm.PrintOption.ClientAreaOnly);


If you want to show the print preview window just add that line before:
printForm1.PrintAction = System.Drawing.Printing.PrintAction.PrintToPreview;



Valery.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900