like this,but I dont get rowhight.
class rowlineTextbox : TextBox
{
const int WM_PAINT = 0xF;
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (m.Msg == WM_PAINT||m.Msg == 0x133)
{
aaa();
}
}
private void aaa()
{
using (Graphics g = Graphics.FromHwnd(base.Handle))
{
Pen tPen;
Size CSize = this.ClientSize;
int cordX1 = this.Location.X + this.Padding.Left;
int cordX2 = CSize.Width - this.Padding.Right;
int cordY1 = this.Location.Y + this.Padding.Top;
int cordY2 = cordY1;
tPen = new Pen(Color.Black, 1.0F);
g.DrawLine(tPen, cordX1, cordY1, cordX2, cordY2);
for (int i = cordY1; i <= CSize.Height; i += this.Font.Height)
{
g.DrawLine(tPen, cordX1, i, cordX2, i);
}
}
}
}