none
Form.ShowDialog and Form.Show not working when published RRS feed

  • Question

  • Hi,

    In Outlook 2010 I have created a custom ribbon group and button in NewMailMessage. When clicking the button a custom form is launched as below. Click handler is located in the ribbon class.

    public void buttonClickCustomForm(Office.IRibbonControl control)
            {
                CustomForm customForm = new CustomForm();
                customForm.ShowDialog(Globals.ThisAddIn.Application.ActiveWindow() as IWin32Window);
                MessageBox.Show("Test!");
    }

    I have also tried

    public void buttonClickCustomForm(Office.IRibbonControl control)
            {
                CustomForm customForm = new CustomForm();
                customForm.ShowDialog();
                MessageBox.Show("Test!");
    }

    and

    public void buttonClickCustomForm(Office.IRibbonControl control)
            {
                CustomForm customForm = new CustomForm();
                customForm.Show();
                MessageBox.Show("Test!");
    }

    All works okay from the machine which I have Visual Studio running on, even if I launch Outlook on its own, not in debug mode. However when I publish the application and install it on another machine and launch Outlook the button displays fine but nothing happens when it is clicked. If I move the MessageBox.Show("!Test") to the top then the test MessageBox displays fine but nothing else.

    Monday, October 1, 2012 9:36 AM

Answers

  • Hi BeMor,

    Thanks for posting in the MSDN Forum.

    I would recommend you create a simple to reproduce your issue and share it on the skydirve.

    It's based on my experience that the key of the issue is lying on CustomForm. We need do further research of it.

    I also hope you are able to dig something on this point.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by BeMor Thursday, October 4, 2012 10:39 AM
    Tuesday, October 2, 2012 9:09 AM
    Moderator

All replies

  • Hi BeMor,

    Thanks for posting in the MSDN Forum.

    I would recommend you create a simple to reproduce your issue and share it on the skydirve.

    It's based on my experience that the key of the issue is lying on CustomForm. We need do further research of it.

    I also hope you are able to dig something on this point.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by BeMor Thursday, October 4, 2012 10:39 AM
    Tuesday, October 2, 2012 9:09 AM
    Moderator
  • Great pointer thanks. Ended up being the PowerPacks assembly missing on the other machine. Thanks for your help.
    Thursday, October 4, 2012 10:38 AM