Question

I have an addin developed in VSTO and as soon as the wait cursor appears and if I click on the other button the click event is fired even in the wait cursor.

How can I disable this event click unless the process is completed?

public bool Part3DVis_Click(Office.IRibbonControl control)
    {
        xtnvis.HelpNamespace = mobjGlobalConfig.HelpFilenamePath;
        xtnvis.tabConrolVisUpdateHelpKeyword();
        excelComponent.Part3DVis_Click();
        return true;
    }

When this event is clicked i need rest of the control n event of other forms to be disable, and after it is returned true, it should enable all the events. How can I do this?

Was it helpful?

Solution

Try this

Application.ScreenUpdating = false;

set it back to true at the end of your process.

MSDN link

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top