I am working on software in that i need to print certain things....... which is the easy way........ kindly help
-
I am working on software in that i need to print certain things....... which is the easy way........ kindly help
amaankhan wrote:
which is the easy way
The easiest way is give us more details. What exactly is "certain things"?
only two letters away from being an asset
-
I am working on software in that i need to print certain things....... which is the easy way........ kindly help
Print to where? To a screen or to a printer? Please read the forum guidelines and rephrase your question.
Navaneeth How to use google | Ask smart questions
-
Print to where? To a screen or to a printer? Please read the forum guidelines and rephrase your question.
Navaneeth How to use google | Ask smart questions
-
amaankhan wrote:
which is the easy way
The easiest way is give us more details. What exactly is "certain things"?
only two letters away from being an asset
-
i want to print Employee Details on the paper ok......my question might be stupid....... sorry i am new to programming field...... with no experience Thanks for reply
It's not your ability to program or the fact that the question may be stupid. The problem is your ability to communicate a complete idea so someone can figure out exactly what you're talking about.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
I am working on software in that i need to print certain things....... which is the easy way........ kindly help
Printing on-screen and sending to the printer are very similar. You need to use the System.Drawing namespace, in particular the Graphics class. Then hook a PrintDocument's main event (can't remember the name) and paint onto the page. Don't forget to take the page settings into account. :)
-
Use a typewriter.
-
It sounds like you need to write a report. I'd suggest that you read up on this using Google.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
Use a typewriter.
ha ha .. .best of all ... :laugh: :laugh:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
Use a typewriter.
The best answer.
-
I am working on software in that i need to print certain things....... which is the easy way........ kindly help
/****************************************** form web ******************************************/ 1using System; 2 3using System.Text; 4 5using System.Collections; 6 7using System.Collections.Generic; 8 9using System.Drawing; 10 11using System.Drawing.Printing; 12 13using System.Data; 14 15using System.Windows.Forms; 16 17namespace EtaocnCS 18{ 19 public class DataGridViewPrinter 20 { 21 private DataGridView TheDataGridView; // The DataGridView Control which will be printed 22 23 private PrintDocument ThePrintDocument; // The PrintDocument to be used for printing 24 25 private bool IsCenterOnPage; // Determine if the report will be printed in the Top-Center of the page 26 27 private bool IsWithTitle; // Determine if the page contain title text 28 29 private string TheTitleText; // The title text to be printed in each page (if IsWithTitle is set to true) 30 31 private Font TheTitleFont; // The font to be used with the title text (if IsWithTitle is set to true) 32 33 private Color TheTitleColor; // The color to be used with the title text (if IsWithTitle is set to true) 34 35 private bool IsWithPaging; // Determine if paging is used 36 37 static int CurrentRow; // A static parameter that keep track on which Row (in the DataGridView control) that should be printed 38 39 static int PageNumber; 40 41 private int PageWidth; 42 43 private int PageHeight; 44 45 private int LeftMargin; 46 47 private int TopMargin; 48 49 private int RightMargin; 50 51 private int BottomMargin; 52 53 private float CurrentY; // A parameter that keep track on the y coordinate of the page, so the next object to be printed will start from this y coordinate 54 55 private float RowHeaderHeight; 56 57 private List<float> RowsHeight; 58 59 private List<float> ColumnsWidth; 60 61 private float TheDataGridViewWidth; 62 63 64 65 // Maintain a generic list to hold start/stop points for the column printing 66 67 // This will be used for wrapping in situations where the DataGridView will not fit on a single page 68 69 private List<int[]> mColumnPoints; 70 71 private List<float> mColumnPointsWidth; 72 73 private int mColumnPoint; 74 75 76 77 // The class constructor 78 7