G
Guest
Hello
I need a way to disable form re-painting until I am done enabling and disabling all controls on the form. The problem I am having is that we have multiple objects (a security component and the specific business UI object) that will indepently enable and disable controls based on a user's role and the business rules of an object (for example, the user may have the rights to enter interview results, but if the applicant hasn't yet been invited, the Interview Results control will be disabled). We are using an Edit button on all our forms, so when that button is pressed, all the controls flicker on and off as the different objects run through their routines. What we want to do then is suspend form painting at the start of the various evaluations, let all the objects enable and disable the various controls, and at the end allow the form to paint the final state of all the controls. We looked into SuspendLayout, but it doesn't seem to cover our problem, plus it is too granular, applying only to the control it is called on. We would like to tell the form to suspend all re-drawing until we give the signal
Any help would be appreciated
Thanks
-Tod
I need a way to disable form re-painting until I am done enabling and disabling all controls on the form. The problem I am having is that we have multiple objects (a security component and the specific business UI object) that will indepently enable and disable controls based on a user's role and the business rules of an object (for example, the user may have the rights to enter interview results, but if the applicant hasn't yet been invited, the Interview Results control will be disabled). We are using an Edit button on all our forms, so when that button is pressed, all the controls flicker on and off as the different objects run through their routines. What we want to do then is suspend form painting at the start of the various evaluations, let all the objects enable and disable the various controls, and at the end allow the form to paint the final state of all the controls. We looked into SuspendLayout, but it doesn't seem to cover our problem, plus it is too granular, applying only to the control it is called on. We would like to tell the form to suspend all re-drawing until we give the signal
Any help would be appreciated
Thanks
-Tod