R
Rodrigo Ferreira
How can i draw a line inside a button?
Rodrigo said:How can i draw a line inside a button?
darek said: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);
}
Rodrigo Ferreira said:and inside a textbox?
Nicholas said: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 said: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.
please you can be more explicit! I don't understand what you want to say!
Nicholas Paldino said: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);
}