Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
GeneralRe: Overridden OnPaint method not called on form Pin
pr1mem0ver18-Feb-19 10:28
pr1mem0ver18-Feb-19 10:28 
QuestionNet Core qustion Pin
pkfox13-Feb-19 23:39
professionalpkfox13-Feb-19 23:39 
AnswerRe: Net Core qustion Pin
Richard Deeming14-Feb-19 2:00
mveRichard Deeming14-Feb-19 2:00 
GeneralRe: Net Core qustion Pin
pkfox14-Feb-19 3:25
professionalpkfox14-Feb-19 3:25 
AnswerRe: Net Core qustion Pin
Wastedtalent14-Feb-19 3:14
professionalWastedtalent14-Feb-19 3:14 
AnswerRe: Net Core qustion Pin
jschell17-Feb-19 6:15
jschell17-Feb-19 6:15 
QuestionHow to count files and change directory using FTP/C# Pin
mlong3012-Feb-19 14:38
mlong3012-Feb-19 14:38 
AnswerRe: How to count files and change directory using FTP/C# Pin
OriginalGriff12-Feb-19 20:02
mveOriginalGriff12-Feb-19 20:02 
AnswerRe: How to count files and change directory using FTP/C# Pin
Richard Deeming13-Feb-19 10:46
mveRichard Deeming13-Feb-19 10:46 
Questionhow can get Windows.Security.Credentials.dll lib C# Pin
Member 1414061510-Feb-19 3:36
Member 1414061510-Feb-19 3:36 
AnswerRe: how can get Windows.Security.Credentials.dll lib C# Pin
OriginalGriff10-Feb-19 4:11
mveOriginalGriff10-Feb-19 4:11 
AnswerRe: how can get Windows.Security.Credentials.dll lib C# Pin
Eddy Vluggen11-Feb-19 2:42
professionalEddy Vluggen11-Feb-19 2:42 
QuestionDo you use obfuscator? Pin
Froddo8-Feb-19 7:01
Froddo8-Feb-19 7:01 
AnswerRe: Do you use obfuscator? Pin
Gerry Schmitz8-Feb-19 10:40
mveGerry Schmitz8-Feb-19 10:40 
AnswerRe: Do you use obfuscator? Pin
Eddy Vluggen11-Feb-19 2:47
professionalEddy Vluggen11-Feb-19 2:47 
GeneralRe: Do you use obfuscator? Pin
Froddo12-Feb-19 6:52
Froddo12-Feb-19 6:52 
GeneralRe: Do you use obfuscator? Pin
Wastedtalent13-Feb-19 21:07
professionalWastedtalent13-Feb-19 21:07 
AnswerRe: Do you use obfuscator? Pin
BillWoodruff16-Feb-19 14:39
professionalBillWoodruff16-Feb-19 14:39 
GeneralRe: Do you use obfuscator? Pin
Froddo18-Feb-19 6:56
Froddo18-Feb-19 6:56 
AnswerRe: Do you use obfuscator? Pin
Member 1412742220-Feb-19 6:33
Member 1412742220-Feb-19 6:33 
GeneralRe: Do you use obfuscator? Pin
Froddo22-Feb-19 9:00
Froddo22-Feb-19 9:00 
QuestionDGVPrinter how to print Logo and a frame in the text Pin
Member 141432997-Feb-19 7:34
Member 141432997-Feb-19 7:34 
AnswerRe: DGVPrinter how to print Logo and a frame in the text Pin
OriginalGriff7-Feb-19 21:21
mveOriginalGriff7-Feb-19 21:21 
GeneralRe: DGVPrinter how to print Logo and a frame in the text Pin
Member 141432998-Feb-19 3:04
Member 141432998-Feb-19 3:04 
Hello colleagues, thank you for answering my question.
1) Thanks for indicate that tha code in my question is Visual Basic. I hope somebody write it in C#
2) DGVPrinter is an article in Code Project:

Another DataGridView Printer
aureolin, 6 Feb 2014  4.85 (178 votes)
Rate: vote 1vote 2vote 3vote 4vote 5
DGVPrinter. DataGridView printing encapsulated in a stand-alone object. Very easy to use! Updated to allow printing columns wider than one page.


Download source code
Download Another DataGridView Printer PDF - 789.27 KB
Introduction
I went looking for a class to do printing from a DataGridView, and none of them did all that I was looking for. I needed to print all pages, some pages, or the current selection; and I needed to not have objects, controls, or code from the printer object sprinkled through the rest of my code - i.e., it needed to be completely self-contained. Nothing I found met all those requirements, so I ended up writing my own.

DGVPrinter's various settings provide good control of all aspects of printing on the page. You can set the Title and Subtitles, add a footer, and control whether the page number prints in the header or footer. DGVPrinter supports Right-to-Left printing for non-Western languages and includes a drawing override for situations where a cell or column has onPaint overridden in the source DataGridView control. While the default styles for the printed DataGridView are taken from the source DataGridView control, DGVPrinter also provides many attributes that allow you to control the styling of almost every aspect of the printout.

History
Version 1.0 - Initial publication
Version 1.1 - Added footer handling, and allows the page number to print in the header or footer, and if it should print on the same line as the header or footer
Version 1.2 - Finally (I believe!), fixed the string/column alignment problems. Also prints cell background colors properly, respecting the alternating rows style
Version 1.3 - Added support for printing columns that contain images
Version 1.4 - Added support for printing directly to a provided Graphics object
Version 2.0 - Added support for printing images on the page
Version 3.0 - Breaking changes! Please read!

About the Author
Report Ad
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
aureolin
Follow
this Member
United States United States
No Biography provided


... Thanks a lot
GeneralRe: DGVPrinter how to print Logo and a frame in the text Pin
OriginalGriff8-Feb-19 3:10
mveOriginalGriff8-Feb-19 3:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.