tags:

views:

176

answers:

2

I'm trying to make a vb.net application that has got 2 textboxes, 7 radio buttons and 2 buttons(one named compile and the other 'run'). How can I load the content of a C/C++(or any programming language) file into the 1st textbox and on clicking the compile button, i should be able to show the errors or the C/C++ program in the 2nd textbox. On clicking Run, I should be able to show the output in the 2nd textbox. In short, I want to use the 2nd textbox as a terminal/console. The radio buttons are 4 selecting the language C or C++ or python or C# or java or perl or vb. Are the compilers of all these languages present in .net? If so how can I call them?

+2  A: 

Look at the System.IO namespace for clues as to how you go about loading the contents of a file into a text box. In particular, the File class.

System.IO.File Class

Look at the System.Diagnostics namespace for clues as to how to go about launching a process and capturing the output. In particular, the Process class.

System.Diagnostics.Process Class

This SO page...

Capturing the Console Output in .NET (C#)

... will give you some more info around capturing console output.

Martin Peck
+1  A: 

Compiling can be done by calling cl.exe which comes with Visual Studio. Of course you could also use GCC instead.

ammoQ