简体   繁体   中英

C# WINFORM ,CONTROLS RESIZING AND LOADING PROBLEM

I have built a new app with some basic Controls like Ribbon as Parent and Other pages as Childs but I am facing Forms Slow loading and sizing issue as you can see in GIF . Every time I open this form its Controls resized 3 to 4 time. Any solution please ????? :( .

在此处输入图片说明

I got Solution .

Every time I clicked ,Parent form generate a new form and previous one is still there and not closed so so many same forms are opened at a time .

I try this solution ,

    private void btnCompanysetup_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
    {
        Form frm = new frmCompanySetup();

        if (Application.OpenForms.OfType<frmCompanySetup>().Count() == 1) {


            frm.BringToFront();
        
        }
        if (Application.OpenForms.OfType<frmCompanySetup>().Count() == 0)
        {


            frm.MdiParent = this;
            frm.Show();

        }
          

         
    }

Thanks for all those response .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM