Click here to Skip to main content
16,020,111 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a form it has a groupbox and this groupbox contains a datagridview and some lables a want to print only this group box form form .. With its contents..!
Posted
Comments
CHill60 25-Feb-14 13:19pm    
What have you tried so far?
Member 10481714 27-Feb-14 16:53pm    
i want to print only groupbox of my form but i dont know how.....

1 solution

You can print any context you want; you are not obliged to print the form. You can use the class System.Drawing.Printing.PrintDocument:
http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument%28v=vs.110%29.aspx[^].

Please see the code sample in this article.

—SA
 
Share this answer
 
v2
Comments
Maciej Los 25-Feb-14 15:39pm    
+5
Sergey Alexandrovich Kryukov 25-Feb-14 16:28pm    
Thank you, Maciej.
—SA
Maciej Los 25-Feb-14 17:12pm    
What you think about alternative solution? See my 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