Home > Net >  VSTO Outlook: popup a custom notification on compose window
VSTO Outlook: popup a custom notification on compose window

Time:06-25

I have an VSTO Outlook Add-in and I would like to popup a notification with a custom text message for a specific time (5 seconds for example) and then disappear automatically. I want to show this notification from within the compose window. How can I achieve this? some example will highly appreciated.

CodePudding user response:

You can create a custom Windows form that closes itself automatically after a timeout.

CodePudding user response:

Use a timer which fires the Tick event on the main thread (UI) where you can call the Close method of your form. The System.Windows.Forms.Timer's event is raised from the UI thread by the message loop when it receives a WM_TIMER message. So, you are good to calling the Close method.

Note, the timer can be run and the form is closed from your code outside of the form or inside the form (built-in to the form).

  • Related