question

krunalc avatar image
0 Votes"
krunalc asked

Office addin - Hide main window

I'm developing VSTO addin using c# for Microsoft Project. What I want is when microsoft project opens up, it should popup the login dialog very first (which I can show without a problem) and till the time login is done, microsoft project window should not load or windowremain hidden. I'm not able to hide or prevent loading the microsoft project window while launching the plugin. I tried few things i.e.

     var app = (MSProject.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("MSProject.Application");
     app.Visible = false;  // doesn't work
     app.WindowHide();  // doesn't work
     app.AppMinimize();  // works

Any inputs on how I can hide the main window of the project till the time login is done?

Thanks,

dotnet-csharpoffice-addins-devoffice-vsto-com-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers