Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:39:20+00:00 2026-05-25T18:39:20+00:00

In my user control I perform a lengthy operation. In order to prevent users

  • 0

In my user control I perform a lengthy operation. In order to prevent users from clicking the UI, I show a progress bar and I disable the whole UI, like this:

this.Enabled = false;
ShowProgressBar();
DoLengthyOperation();
RemoveProgressBar();
this.Enabled = true;

This works OK. However, my user control has many other controls on it, which also have controls inside them, which also have controls inside them,… etc. The

this.Enabled = false 

call thus disables many many controls. This is intentional. But the problem I have is that you can actually see the UI disabling every control one by one. It goes pretty fast but since there are so many controls, you can actually see it running through all the controls. This does not look professional, it makes the screen flicker and my eyes hurt.

Is there a way so that I can prevent the UI from redrawing until all controls are disabled and then perform a single redrawing?

I hope this is not a stupid question 😉

Don’t know if this is relevant: my controls are derived from DevExpress.XtraEditors.XtraUserControl.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:39:21+00:00Added an answer on May 25, 2026 at 6:39 pm

    None of the suggestion solutions seems to work.

    I think part of the problem is that I use DevExpress and every control does not directly contain its subcontrol, but uses LayoutControlGroups and LayoutControls and panels etc. The actual amount of controls used is thus a lot higher than the actual controls that you see on the screen and that need to be disabled.

    So I just added my own recursive function that disables only controls of certain types, in my case Buttons and Edit boxes. The rest is just ignored. Not only is this a lot faster, it also looks much nicer. No flickering at all any more.

    I think I’m going to use this solution, but I do appreciate the effort of everyone who put an answer or a comment here, thanks!

    Now I see that my question seems to be a duplicate of this one: How do I suspend painting for a control and its children?
    Haven’t tried that solution tough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have user control named DateTimeUC which has two textboxes on its markup: <asp:TextBox
I have a user control in a repeater that I need to pass data
I am creating a user control in C# and I am adding my own
I have created a user control to handle adding comments to certain business entities,
I created an Interop user control in VS2005. When the user control is shown
I have a user control that is pretty basic. It contains several TextBox controls,
I have a web user control that contains several other (web user) controls and
I have a user control ( gallery.ascx ) and I want to use the
I make a user control and then want to include it on a page
I've created a user control (in vb.net code) that contains two dock panels, one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.