G
G.Esmeijer
Friends,
I'm (a bit) dissapointed about the printing possibilities in c#. It could
also be lack of knowedge.
I would like to align a text on the right side of the paper when printing.
For example
tekst = DateTime.Today.Date.ToString("dd-MM-yyyy");
// asign content to the variable tekst
SizeF stringSize= ev.Graphics.MeasureString(tekst, printFont);
// measure the length of the tekst ... in what??
xPos = (float) ev.MarginBounds.Right - stringSize;
// to aligh it on thr right side of the paper
ev.Graphics.DrawString (tekst, printFont, Brushes.Black, xPos, yPos, new
StringFormat());
I would like to print tekst now but I have problems with the typing.
I tried all kinds of things but there must be some easy way of doing this.
Who can help me with this..
and who knows a bunch of nice printing functions. I dont like the way C#
handles the printer control.
regards
Gerrit Esmeijer
I'm (a bit) dissapointed about the printing possibilities in c#. It could
also be lack of knowedge.
I would like to align a text on the right side of the paper when printing.
For example
tekst = DateTime.Today.Date.ToString("dd-MM-yyyy");
// asign content to the variable tekst
SizeF stringSize= ev.Graphics.MeasureString(tekst, printFont);
// measure the length of the tekst ... in what??
xPos = (float) ev.MarginBounds.Right - stringSize;
// to aligh it on thr right side of the paper
ev.Graphics.DrawString (tekst, printFont, Brushes.Black, xPos, yPos, new
StringFormat());
I would like to print tekst now but I have problems with the typing.
I tried all kinds of things but there must be some easy way of doing this.
Who can help me with this..
and who knows a bunch of nice printing functions. I dont like the way C#
handles the printer control.
regards
Gerrit Esmeijer