Home > Allgemein > dont use a messagebox while start for your addin

dont use a messagebox while start for your addin


sometime its very usefull in development to bring a message in front for debugging or diagnostics.
typical is a messagebox in OnConnection or OnStartupComplete but ist not a good idea to this.
the problem occurs when you create a new office instance programaticly(or anyone else).
let see:

// c#
Excel.Application app = new Excel.Application();

if you run this code, a new instance is created and the instance load all loadonstartup addins and is ready to go after them. but now we block this process with a messagebox in OnConnection or OnStartupComplete. the example code throws a component creation error(timeout) in this case. For this reason, the next NetOffice release includes some compatible dialogs and a messagebox without blocking the process(pseudo-modal). Office doesnt spend a safe notification feature or not? any kind of method like Alert or something like that available in Office?

Sebastian

Advertisements
Categories: Allgemein
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: