Hello,

You could use something like that:

public MdiMainForm() {
        //
        // Required for Windows Form Designer support
        //
        InitializeComponent();

        //
        // TODO: Add any constructor code after InitializeComponent call
        //

        foreach(Control ctrl in Controls) {
                if(ctrl is MdiClient) {
                        ctrl.Paint += new
PaintEventHandler(OnPaintMdiChild);
                        ctrl.BackColor = SystemColors.Desktop;
                        break;
                }
        }

}

protected virtual void OnPaintMdiChild(object sender, PaintEventArgs e)
{
        // paint something special
}

Regards,
Michael Rednikin

--
http://www.cooldev.com/coolbarsdotnet.html
#CoolBars.NET is complete menus and toolbats solution for .NET
#Offshore development of high quality.
CoolDev.Com

> -----Original Message-----
> From: Dinesh Upare [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, April 19, 2002 10:32 AM
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] Changing backcolor of an MDI Form?
> 
> 
> Hi,
> I would like paint a gradient effect on the form.
> I am trying to use a GradientBrush and filling the rectangle 
> of a specified
> region.
> 
> I could achieve it on a normal form but not on a MDI form.
> 
> Does anyone know how to assign a backcolor to "MDI" which is 
> visible on the
> client area (where child form opens)?
> 
> Thanks.
> 
> Dinesh Upare
> 
> You can read messages from the DOTNET archive, unsubscribe 
> from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
> 

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to