views:

26

answers:

1

Hi, i am developing a outlook addin in c#, heres my startup:

private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        //adds the new issueTopMenu
        //Search the menu and delete if found
        RemoveMenubar();

        //adds the panel
        AddPanelToExplorer();

        //Method to create new menu
        AddMenuBar();
    }

How can i do it to run on a thread, because it access to a webservice to get some data, and when outlook start it freezes until it obtain the data, and i want to eleminate that freeze time.

+1  A: 

Outlook Object model uses single thread. so even if you have multiple threads in your add in, if those thread are executing code which uses outlook object model, it will work as a single threaded app. You can seperate the code which does not use outlook object model like accessing the web service and fetching the data and execute this code in a seperate thread. this way you can make use of multi threading.

Kapilg