Hi, i want to create an info box in .net 2 (attached is an image with an example) I wanted to use a panel, but I cannot change the color of its border.
is it possible to change this property? if so, how?
Thanks, Shuky
Hi, i want to create an info box in .net 2 (attached is an image with an example) I wanted to use a panel, but I cannot change the color of its border.
is it possible to change this property? if so, how?
Thanks, Shuky
You can't change the color of the border directly, but, you draw your own in any color and style you wish. See this article.
Example of the code from the article. (That's all you'll need.)
private void panel1_Paint(object sender, PaintEventArgs e) {
ControlPaint.DrawBorder(e.Graphics, this.panel1.ClientRectangle,
Color.DarkBlue, ButtonBorderStyle.Solid);
}
private void panel1_Resize(object sender, EventArgs e)
{
Invalidate();
}