Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

use Multiple forms in one Csharp panel in one Windows Form panel

subForm = new SubFormYouWantToLoad();
            subForm.TopLevel = false;
            subForm.FormBorderStyle = FormBorderStyle.None;
            ContainerPanel.Controls.Add(subForm , 0, 1);
            subForm .Visible = true;

// You can add this code when you click on the specific button. 
// Here each subform is added to the Panel as a Control. 
// You should remove the subform from the panel's control list before 
// adding another subform. For this ,it is better to remove,close and 
// dispose the first one.

ContainerPanel.Controls.Remove(activeform);
activeform.Close();
activeform.Dispose();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Multiple #forms #Csharp #panel #Windows #Form #panel
ADD COMMENT
Topic
Name
4+9 =