How can I capture output from an arbitrary console application from within my Window Form application
Use the Process class found in the System.Diagnostic namespace. Process proc = new Process(); // test.exe is a console application generated by VC6 proc.StartInfo.FileName = @’C:\test\test.exe’; proc.StartInfo.Arguments = ”; proc.StartInfo.CreateNoWindow = true; proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; proc.Start(); string output = proc.StandardOutput.ReadToEnd(); //output now holds what text.exe would have displayed to the console
How do I create and use a component
Take a look at Mahash Chand’s Creating C# Class Library (Dll) found on C# Corner.
How do I change a directory name
Use the static move member of the Directory class. Directory.Move(oldPathString, newPathString);
How can I dynamically load a resource file
You use the ResourceManager class found in System.Resources to access and control resources. See the article by Caspar Boekhoudt on C# Corner for a detailed discussion.
How do I change the Zorder of my docked windows at design time
You can use the menu selection Format|Move To Front or Format|Send To Back to change the Zorder and update your docking.