This is a way to wrap the main window of Visual Studio in a klass that implements the IWin32Window interface.
This is useful for example when Visual Studio should be used as the owner of a MessageBox.
The code was found here.
' this is the name of the process we want to execute
p.StartInfo.FileName = process
If Not (workingDir = "") Then
p.StartInfo.WorkingDirectory = workingDir
End If
p.StartInfo.Arguments = param
' need to set this to false to redirect output
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = True
' start the process
p.Start()
' read all the output
' here we could just read line by line and display it
' in an output window
Dim output As String = p.StandardOutput.ReadToEnd
' wait for the process to terminate
p.WaitForExit()
Return output
End Function
Code from http://www.developerfusion.co.uk/show/4662/.
[powered by WordPress.]
jour·nal n. A personal record of occurrences, experiences, and reflections kept on a regular basis; a diary.
36 queries. 0.713 seconds