Click here to Skip to main content
15,888,610 members
Home / Discussions / C#
   

C#

 
Generalapplication hotkeys Pin
haimon155-Aug-03 6:56
haimon155-Aug-03 6:56 
GeneralTieing textboxes to grid Pin
Ista5-Aug-03 6:18
Ista5-Aug-03 6:18 
GeneralRe: Tieing textboxes to grid Pin
Ista5-Aug-03 9:48
Ista5-Aug-03 9:48 
Generalparent, showing a form Pin
THEMYTH5-Aug-03 5:07
THEMYTH5-Aug-03 5:07 
GeneralRe: parent, showing a form Pin
Rocky Moore5-Aug-03 9:51
Rocky Moore5-Aug-03 9:51 
GeneralMdi-Application Pin
JM_FL5-Aug-03 1:47
JM_FL5-Aug-03 1:47 
GeneralRe: Mdi-Application Pin
apferreira5-Aug-03 7:39
apferreira5-Aug-03 7:39 
Generaloffset printing to paper but not in print preview Pin
misterbear5-Aug-03 0:45
misterbear5-Aug-03 0:45 
I have just added some print functionality to an application, and it looks just fine in the print preview, the margins come out just the way I want them, etc etc. But when I print to paper the whole printout has an offset of 1/4 inch to the right and down...

does anyone know/(have an idea) why this happens? Is it because of the printer?

When i for example use the PageBounds or the MarginBounds like this,

override void OnPrintPage(PrintPageEventArgs e)
{

Rectangle r1 = e.PageBounds;
Rectangle r2 = e.MarginBounds;

Graphics g = e.Graphics;

//set equal margins around all edges (cause that's what I want)
this.DefaultPageSettings.Margins = new Margins(20, 20, 20, 20);

//Test: draw bound rectangles to see what happens...
g.DrawRectangle(Pens.Black, r1);
g.DrawRectangle(Pens.Black, r2);

}

these rectangles are truly centered in the preview, but on paper they have the offset mentioned above.

Can anyone help me?

Generalcomment... Pin
misterbear5-Aug-03 0:46
misterbear5-Aug-03 0:46 
GeneralRemoting Pin
Ivan Fernandez5-Aug-03 0:27
Ivan Fernandez5-Aug-03 0:27 
GeneralRe: Remoting Pin
Valeria Bogdevich5-Aug-03 2:55
Valeria Bogdevich5-Aug-03 2:55 
GeneralAn activeX in C# Pin
mrpink5-Aug-03 0:27
mrpink5-Aug-03 0:27 
GeneralRe: An activeX in C# Pin
Anonymously5-Aug-03 1:04
Anonymously5-Aug-03 1:04 
GeneralRe: An activeX in C# Pin
p daddy5-Aug-03 3:38
p daddy5-Aug-03 3:38 
GeneralRe: An activeX in C# Pin
mrpink5-Aug-03 4:29
mrpink5-Aug-03 4:29 
GeneralRe: An activeX in C# Pin
Stephane Rodriguez.5-Aug-03 4:46
Stephane Rodriguez.5-Aug-03 4:46 
GeneralRe: An activeX in C# Pin
mrpink5-Aug-03 6:03
mrpink5-Aug-03 6:03 
GeneralRe: An activeX in C# Pin
Stephane Rodriguez.6-Aug-03 2:22
Stephane Rodriguez.6-Aug-03 2:22 
Generali,Remtoing Pin
Ivan Fernandez5-Aug-03 0:24
Ivan Fernandez5-Aug-03 0:24 
GeneralCreating child window Pin
S O S5-Aug-03 0:07
S O S5-Aug-03 0:07 
GeneralRe: Creating child window Pin
Furty5-Aug-03 0:54
Furty5-Aug-03 0:54 
GeneralRe: Creating child window Pin
S O S5-Aug-03 4:19
S O S5-Aug-03 4:19 
GeneralRe: Creating child window Pin
Arun Bhalla5-Aug-03 5:37
Arun Bhalla5-Aug-03 5:37 
GeneralRe: Creating child window Pin
S O S5-Aug-03 10:04
S O S5-Aug-03 10:04 
GeneralRe: Creating child window Pin
Arun Bhalla5-Aug-03 10:37
Arun Bhalla5-Aug-03 10:37 

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.