C# Add-In Form.Show or Form.ShowDialog fails to show Form in Outlook.
-
Saturday, August 11, 2012 2:49 PM
Outlook 2010 C# add-in
I added a ribbon with a button that shows up in the Outlook main explorer window - it's group is set to show in the Send/Receive tab of the main 'menu' ribbon toolbar.
Clicking the button calls a function from the ThisAddIn.cs class like this:
private void btnSettings_Click(object sender, RibbonControlEventArgs e) { Globals.ThisAddIn.UseCustomForm(); }In ThisAddIn.cs
public void UseCustomForm() { if (setup == null) { setup = new SetupForm(); } setup.ShowDialog(); }In debug mode, the dialog displays correctly.
In release mode, nothing happens!
ANY HELP APPRECIATED
.Net thingy maker type guy.
All Replies
-
Saturday, August 11, 2012 3:44 PM
make sure that your evebt handler is called (logging) and instead of yourform.ShowDialog, try to display MessageBox.Show - is popup shown?
- Marked As Answer by rachmann Saturday, August 11, 2012 3:54 PM
-
Saturday, August 11, 2012 3:53 PM
At first it didn't do the MessageBox.Show()
But, I am doing a lot of initialization before that, so I put the MessageBox.Show() at the start of the function.
The first message shows, the second one does not.
Thus there is a bug betwixt the two..
Don't know why I didn't try that -
Thanks!!
.Net thingy maker type guy.
-
Saturday, August 11, 2012 4:16 PMso, messagebox.show appears, but your form.ShowDialog does not? is your form a normal winforms form? or do you do something fancy there, like override wndproc and manually handle some messages?
-
Saturday, August 11, 2012 4:18 PM
no - I was saying that I added multiple MessageBox.Show() commands at various points in routine.
I discovered that it failed when looking for a Resource string, prior to trying to call the Form.ShowDialog();
So it didn't even get close enough to call it with the earlier error.
.Net thingy maker type guy.
-
Saturday, August 11, 2012 8:03 PMso, problem solved?
-
Saturday, August 11, 2012 10:17 PM
No - now that I know the problem, I'll start a new thread - for the error:
MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the nutral culture
.Net thingy maker type guy.

