tags:

views:

100

answers:

1

Hello, I'm trying to embed visual studio as a user control (to enable the user editing a generated source file). Basically most details can be found in a nice CodeProject entry Hosting EXE Applications in a WinForm project.

What bothers me is that after launching VS as a new process it takes some time before it settles down on the form. During this period I'd like it to be hidden, so I tried:

process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden

Also tried to turn on "CreateNoWindow" of ProcessStrartInfo with no successes. (As a side question, I'm using process.WaitForInputIdle() to wait for VS before capturing its window handle, but on some machines the calls just returns immediatly).

Any clues? other suggestions? thanx in advance. Robi

+3  A: 

If you just want your user to be able to edit a source file inside your app, I'd recommend using a text edit control with syntax highlighting instead of embedding Visual Studio in your project. One option is ICSharpCode.TextEditor.

You can find more info about it in this CodeProject article.

Rodrigo Sieiro
Agreed. If you embed VS, every user needs to have a license, I believe.
Chris Doggett