Change Background of an MDI Form
Hi all,
How can I change the BACKGROUND color of the MDI FORM in C#?
I changed it using the background color property but the color is not changed.
What should I do to perform this task?
Please help me out!!
Thanks in advance!!
S2009
Junior Poster in Training
67 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
You can't for sorry change it!
Ramy Mahrous
Postaholic
2,196 posts since Aug 2006
Reputation Points: 480
Solved Threads: 276
It always defaults to the default background color of a control.
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
i tried something like this but it didnt work :
protected override void OnPaintBackground(PaintEventArgs e)
{
base.OnPaintBackground(e);
Pen pen = new Pen(Color.Red, 3);
Rectangle rect = new Rectangle(0, 0, 300, 300);
e.Graphics.DrawRectangle(pen, rect);
}
serkan sendur
Postaholic
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127