Click here to Skip to main content
15,889,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sir,
I have draw print out of simple form using c sharp. On this form we have given lable ,textbox,datagridview & combo-box all this include in this form.I have also show the record in datagridview.
Posted
Updated 22-Mar-12 6:10am
v3
Comments
[no name] 22-Mar-12 10:14am    
What part of this do you need help with? Do you have an actual question?
Sergey Alexandrovich Kryukov 22-Mar-12 16:44pm    
I agree, not a question, but two answers provided so far can help OP already...
--SA

You need to use the class System.Drawing.Printing.PrintDocument; please see this MSDN help page with a simple code sample:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx[^].

—SA
 
Share this answer
 
You might try this codeproject article Form Print Control[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Mar-12 16:42pm    
Can be very helpful exactly in the situation OP has. My 5 of course.
--SA
Do you mean print a string? Concatenate all values and then print them?
Can you be more specific?

A few months ago I wrote a tutorial explaining how to print from a list box, if you want to print a "simple" string, you can follow it.

Last method, where I actually build the print string, you can generate based on values you have in your form.

Take a look
http://codeabout.wordpress.com/2010/12/27/print-from-a-listbox-using-c/[^]
 
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