Click here to Skip to main content
15,905,967 members
Home / Discussions / C#
   

C#

 
AnswerRe: nextline Pin
Guffa18-Oct-07 23:09
Guffa18-Oct-07 23:09 
GeneralRe: nextline Pin
zeeShan anSari18-Oct-07 23:15
zeeShan anSari18-Oct-07 23:15 
GeneralRe: nextline Pin
zeeShan anSari18-Oct-07 23:18
zeeShan anSari18-Oct-07 23:18 
GeneralRe: nextline Pin
Colin Angus Mackay18-Oct-07 23:24
Colin Angus Mackay18-Oct-07 23:24 
GeneralRe: nextline Pin
zeeShan anSari18-Oct-07 23:38
zeeShan anSari18-Oct-07 23:38 
QuestionPrinting in C# [modified] Pin
Maddie from Dartford18-Oct-07 22:59
Maddie from Dartford18-Oct-07 22:59 
AnswerRe: Printing in C# Pin
Abhijit Jana18-Oct-07 23:59
professionalAbhijit Jana18-Oct-07 23:59 
GeneralRe: Printing in C# Pin
Maddie from Dartford19-Oct-07 0:32
Maddie from Dartford19-Oct-07 0:32 
Let's have a look at the datagrid print code i am writing......

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
int iHorzResolution = e.PageSettings.PrinterResolution.X;
int iVertResolution = e.PageSettings.PrinterResolution.Y;

int iPaperWidth = e.PageSettings.PaperSize.Width;
int iPaperHeight = e.PageSettings.PaperSize.Height;

int iWidthPixel = iPaperWidth * iHorzResolution/100;
int iHeightPixel = iPaperHeight * iVertResolution/100;

PaintEventArgs myPaintArgs = new PaintEventArgs(e.Graphics, new Rectangle(new Point(0, 0), new Size(iWidthPixel, iHeightPixel)));
this.InvokePaint(datgrdSerialNumber, myPaintArgs);

}

private void btnPrint_Click(object sender, EventArgs e)
{
printDocument1.Print();
}



Now if i fire the print command, i am not getting the size of of grid accroding to my page(A4). It just prints the grid in left corner. Where am i going wrong???

Thanks.
QuestionPrevent to removing row from DataTable Pin
El'Cachubrey18-Oct-07 21:37
El'Cachubrey18-Oct-07 21:37 
AnswerRe: Prevent to removing row from DataTable Pin
il_masacratore18-Oct-07 22:50
il_masacratore18-Oct-07 22:50 
QuestionGet files from rar-span Pin
Johan Martensson18-Oct-07 21:19
Johan Martensson18-Oct-07 21:19 
AnswerRe: Get files from rar-span Pin
leppie19-Oct-07 4:57
leppie19-Oct-07 4:57 
Question[Message Deleted] Pin
Trustapple18-Oct-07 21:01
Trustapple18-Oct-07 21:01 
AnswerRe: accessibilty Pin
stancrm18-Oct-07 21:14
stancrm18-Oct-07 21:14 
AnswerRe: accessibilty Pin
Nouman Bhatti18-Oct-07 21:17
Nouman Bhatti18-Oct-07 21:17 
AnswerRe: accessibilty Pin
Malcolm Smart18-Oct-07 21:40
Malcolm Smart18-Oct-07 21:40 
AnswerRe: accessibilty Pin
J4amieC18-Oct-07 22:06
J4amieC18-Oct-07 22:06 
AnswerRe: [Message Deleted] Pin
J4amieC18-Oct-07 23:06
J4amieC18-Oct-07 23:06 
GeneralRe: [Message Deleted] Pin
Malcolm Smart18-Oct-07 23:11
Malcolm Smart18-Oct-07 23:11 
Questionopen an html file Pin
kuscu18-Oct-07 20:56
kuscu18-Oct-07 20:56 
AnswerRe: open an html file Pin
Malcolm Smart18-Oct-07 20:59
Malcolm Smart18-Oct-07 20:59 
GeneralRe: open an html file Pin
kuscu22-Oct-07 11:03
kuscu22-Oct-07 11:03 
GeneralRe: open an html file Pin
Malcolm Smart22-Oct-07 11:38
Malcolm Smart22-Oct-07 11:38 
AnswerRe: open an html file Pin
Kristian Sixhøj18-Oct-07 21:01
Kristian Sixhøj18-Oct-07 21:01 
AnswerRe: open an html file Pin
N a v a n e e t h18-Oct-07 21:02
N a v a n e e t h18-Oct-07 21:02 

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.