プログラムのようなメモ帳でOKです。私は予約語を青で印刷し、テキストは余白の中に収まるようにしたいと思っています。 ? これは私がこれまで持っているものです。色で予約されたキーワードC#を印刷します
int charPag = 0;
int linPag = 0;
Font rodFont = new Font("Courier New", (float)10.0);
e.Graphics.MeasureString(stringToPrint, txtMain.Font, e.MarginBounds.Size, StringFormat.GenericTypographic, out charPag, out linPag);
e.Graphics.DrawString(stringToPrint, txtMain.Font, new SolidBrush(Color.Black), e.MarginBounds, StringFormat.GenericTypographic);
stringToPrint = stringToPrint.Substring(charPag);
e.Graphics.DrawLine(Pens.Black, e.MarginBounds.Left, e.MarginBounds.Bottom, e.MarginBounds.Right, e.MarginBounds.Bottom);
e.Graphics.DrawString(numPag.ToString(), rodFont, Brushes.Black, e.MarginBounds.Right - (numPag.ToString().Length * rodFont.SizeInPoints), e.MarginBounds.Bottom + 5);
if (stringToPrint.Length > 0)
{
e.HasMorePages = true;
numPag++;
}
なぜそこに、利用可能な無料のため、すでにあるものを再発明?あなたのアプリケーションでtextAreaとしてScintilla.NETを使用してください... http://scintillanet.codeplex.com/ –
それは学校のためであり、私はそれを自分で行う必要があります。(残念ながら) –
Erm、待って、助けを求めています自分でやる? [宿題]タグを使用します。 –