I have a MdiParent form and a Carousel that i would like to merge together.
is there a way to have the carousel as a background for the mdi Parent form?
the purpose is to have the carousel always visible behind other child forms.
thank you.
3 Answers, 1 is accepted
0
Deyan
Telerik team
answered on 15 May 2009, 09:22 AM
Hi Subodh,
Thanks for contacting us.
The MdiClient control which holds the MDI children forms does not support transparent background color. It is also not possible to add any type of controls in this container. Therefore the scenario that you would like to implement is not possible due to this constraints implied by the MDI infrastructure of Windows Forms.
Do not hesitate to write back if you have further questions.
How about just a plain Jpg image file as a background of the MDI Parent Form? (just like how they do in Microsoft excel 2007)
0
Deyan
Telerik team
answered on 20 May 2009, 08:05 AM
Hello Subodh,
Thanks for writing.
You can add an Image as a background of the MdiParent form. You should just find the MdiClient instance in the Controls collection of your MDI parent and set its BackgroundImage property.
Take a look at this code snippet:
MdiClient mdiClient = null;
for (int i = 0; i < this.Controls.Count; i++)
{
if (this.Controls[i] is MdiClient)
{
mdiClient = this.Controls[i] as MdiClient;
break;
}
}
if (mdiClient != null)
{
mdiClient.BackgroundImage = myImage;
}
Basically, I use a for loop to iterate the Controls collection of my MdiParent form. When I find the MdiClient instance (the control which holds all MDI child forms) I assign it to a variable and later set the BackgroundImage property of it.
I hope this will help.
Do not hesitate to write back if you have further questions.