Problem:
Some time you have already created many form. then are opening separately when you click on any button in MDI Form or separate in C# winform. After soe time requirement has changed. the new requirement is to open new form in the same form from where you are clicking button.For better understand see below image
Show Form with in form as image |
Solution:
Use panel control to show form
Example:
panel1.Visible = true;panel1.Controls.Clear();
StandardTest f1 = new StandardTest(); // this the form which you want to show
f1.TopLevel = false;
panel1.Controls.Add(f1);
panel1.Width = 1100;
panel1.Height = 620;
f1.Width = 1100;
f1.Height = panel1.Height - 0;
f1.Dock = DockStyle.Left;
f1.Show();
0 comments:
Post a Comment