Hosting VisualStudio on Winform and running it is minimized

I am trying to implement visual studio as a custom control (so that the user can edit the generated source file). Basically most of the details can be found in the good CodeProject post Hosting EXE Applications in a WinForm Project .

My concern is that after starting VS as a new process, it takes a while before it drops down onto the form. During this period, I would like it to be hidden, so I tried:

process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden

      

Also tried to include "CreateNoWindow" in ProcessStrartInfo without any success. (As a side question, I use process.WaitForInputIdle () to wait for VS before grabbing the window handle, but on some machines the calls return immediately).

Any hints? other offers? than before. Roby

0


a source to share


1 answer


If you just want your user to be able to edit the source file inside your application, I would recommend using a syntax highlighting text control instead of embedding Visual Studio into your project. One of the options is ICSharpCode.TextEditor .



You can read more about this in this CodeProject article .

+3


a source







All Articles