This is a migrated thread and some comments may be shown as answers.

Carousel as MDIParent form background

3 Answers 181 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Subodh Gupta
Top achievements
Rank 2
Subodh Gupta asked on 14 May 2009, 06:16 PM
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

Sort by
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.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Subodh Gupta
Top achievements
Rank 2
answered on 19 May 2009, 07:27 PM
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.

Best wishes,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Carousel
Asked by
Subodh Gupta
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Subodh Gupta
Top achievements
Rank 2
Share this question
or