Hi!!
In the Attachment I have a project very simple, just a form and a two classes: the TestTB and the TestB. The testTB class Inherits from the TextBox class and the TestB Inherits from the Button class. And the only sub that they have is this one:
In the form i have a TestTB control and a TestB control. Now my question is why in hell doesn't the TestTB control shows the little numbers like the TestB control??Code:Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) MyBase.OnPaint(e) e.Graphics.DrawString("1", Me.Font, New SolidBrush(Me.ForeColor), 3, 1) e.Graphics.DrawString("2", Me.Font, New SolidBrush(Me.ForeColor), 13, 1) e.Graphics.DrawString("3", Me.Font, New SolidBrush(Me.ForeColor), 23, 1) e.Graphics.DrawString("4", Me.Font, New SolidBrush(Me.ForeColor), 3, 13) e.Graphics.DrawString("5", Me.Font, New SolidBrush(Me.ForeColor), 13, 13) e.Graphics.DrawString("6", Me.Font, New SolidBrush(Me.ForeColor), 23, 13) e.Graphics.DrawString("7", Me.Font, New SolidBrush(Me.ForeColor), 3, 25) e.Graphics.DrawString("8", Me.Font, New SolidBrush(Me.ForeColor), 13, 25) e.Graphics.DrawString("9", Me.Font, New SolidBrush(Me.ForeColor), 23, 25) End Sub




Reply With Quote