Rodrigo,
The same code would apply to the textbox. The Paint event would allow
you to perform extra paint operations whenever the control was painted.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Rodrigo Ferreira said:
and inside a textbox?
Rodrigo Ferreira wrote:
How can i draw a line inside a button?
this.button1.Paint +=
new System.Windows.Forms.PaintEventHandler(this.button1_Paint);
private void button1_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
e.Graphics.DrawLine(
new System.Drawing.Pen(System.Drawing.Color.Red),0,0,10,10);
}