Ribbon on a MDI Parent Form

Hi,

can anyone send me an example of a mdi parent form with a ribbon ?

I did several tests but I could not get it to work properly.
Ora maintains the caption of the form, or gives other problems.

If an example is not possible, a step-by-step explanation was very good.

Thanks


Ricardo

3 Replies

SK Senthil Kumaran Rajan Syncfusion Team August 21, 2018 11:10 AM UTC

Hi Ricardo, 
 
Thank you for contacting syncfusion support. 
 
Steps to create MDI form in Ribbon control 
 
  1. Open the Designer and Drag and drop “RibbonControlAdv” from Toolbox. For customizing the RibbonControlAdv, please refer the below link
    Link :  https://help.syncfusion.com/windowsforms/ribboncontroladv/getting-started     
  2. By default, the Form in application will extend to Form class. Add the respective namespace and programmatically change it as RibbonForm class
  3. Go to the property window of Ribbon form and set the "IsMdiContainer" property to True (the default value is False).
  4. Now Add the child form using Add new item option.
  5. In Form_Load event of Parent form , create a new instance for child form and set MdiParent property as Parent form. Please refer the below code snippet.
 
            ChildForm child = new ChildForm(); 
            child.WindowState = FormWindowState.Maximized; 
            child.MdiParent = this; 
            child.Show(); 
 
 
For your reference we have prepared a sample and it can be downloaded from below location 
 
Please let us know if you require further assistance. 

Regards,
 
Senthil 



RA Ricardo Abranches August 21, 2018 03:14 PM UTC

thanks for the quick response.
 I will now try to convert from C # to VB.NET.
I'm in the process of switching from vb6 to vb.net, so there are things in .NET that still are very confusion.
Can you explain exactly how to "Add the respective namespace and programmatically change it to the RibbonForm class" in vb.net ?

Thank you


SK Senthil Kumaran Rajan Syncfusion Team August 22, 2018 05:41 AM UTC

Hi Ricardo, 
 
Thank you for the update. 
 
By default, Form1 class in application inherits Form class, You can add “Imports Syncfusion.Windows.Forms.Tools” namespace and then change it to RibbonForm. Please make use of below code snippet. 
 
 
Imports Syncfusion.Windows.Forms.Tools 
 
Public Partial Class Form1 
    Inherits RibbonForm 
 
End Class 
 
 
In Form_Load event add the below code snippet to add the child form in MainForm. 
 
 
Private Sub ParentForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load 
        Dim child As New ChildForm() 
        child.WindowState = FormWindowState.Maximized 
        child.MdiParent = Me 
        child.Show() 
End Sub 
 
 
For your reference we have prepared the sample in VB.Net and it can be downloaded from below location. 
 
 
Please let us know if you require further assistance. 
 
Regards, 
Senthil 


Loader.
Up arrow icon