Carousel as MDIParent form background

4 posts, 0 answers
  1. Subodh Gupta
    Subodh Gupta avatar
    8 posts
    Member since:
    Apr 2009

    Posted 14 May 2009 Link to this post

    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.
  2. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 15 May 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Subodh Gupta
    Subodh Gupta avatar
    8 posts
    Member since:
    Apr 2009

    Posted 19 May 2009 Link to this post

    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)
  5. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 20 May 2009 Link to this post

    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.
Back to Top