Search code examples
c#.netc#-4.0bunifu

How to used circular progress when something is loading in c# and other window remains disabled


Hello everyone I want to create a application which has progress bar ,is loading and other window are disabled in c#


Solution

  • You can make a progress bar with bunify like you already use it and during the progress bar is showed in a shild window, you deactived other window.

    You can make something like that in winform for blocking the parent window:

    ChildForm child = new ChildForm();
    child.Owner = this;
    child.Show();
    
    In ChildForm_Load:
    private void ChildForm_Load(object sender, EventArgs e) {
      this.Owner.Enabled = false;
    }
    
    private void ChildForm_Closed(object sender, EventArgs e) {
      this.Owner.Enabled = true;
    }
    

    and for the progress bar, you can look there: https://bunifuframework.com/products/bunifu-ui-winforms/controls/bunifu-progress-bar/