3
My Windows Forms program runs another console program. This second one writes messages on the screen while running. I want to know if you can prevent the execution of the other program from opening the console, and instead, the printf of the other program (which is written in C++) is displayed in my Textbox.
Practical example: Imagex is a Microsoft console program. A user created Gimagex which has a graphical interface and runs Imagex and all text outputs appear in Gimagex.
In this scheme the console still opens but without text, but the problem is that in the line that passes the text to my Textbox (which is called "Output") generates the exception:
Operação entre threads inválida: controle 'Saida' acessado de um thread que não é aquele no qual foi criado.
. And yes, the console executable does not require user intervention.– Marcelo Nascimento
Open the console is just like that. Regarding the thread if you are executing my code in another thread no visual component can be accessed. Use a Task along with a Iprogress
– ramaral