C# message box

Top  Previous  Next

You can either use the standard windows one:


       public void Activate(Inventor.ApplicationAddInSite addInSiteObject, bool firstTime)


           // This method is called by Inventor when it loads the addin.

           // The AddInSiteObject provides access to the Inventor Application object.

           // The FirstTime flag indicates if the addin is loaded for the first time.


           // Initialize AddIn members.

           m_inventorApplication = addInSiteObject.Application;


           // TODO: Add ApplicationAddInServer.Activate implementation.

          MessageBox.Show ("Hello");




or the Inventor one:


You can use build-in "message box" inventorApp.CommandManager.PromptMessage(...), but its usage is little bit obscure. See API reference for more information.


Advantage of this is when Inventor is in silent mode, this PromptMessage is not displayed and don't block application.


When you use MessageBox, this is displayed always and user MUST close them. This may be a trouble when you run some automatic task without user interaction.



Enter topic text here.

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)