简体   繁体   English

如何在其他 windows 表单项目上运行控制台应用程序

[英]How to run console app on other windows form project

Hi i have a existing console app in c# and win form project on the same solution嗨,我在 c# 中有一个现有的控制台应用程序,并在同一解决方案上赢得表单项目

Is there a way to run the console app on my winform providing the readkey needed on the console app from the textbox on my win form Sorry for my bad english有没有办法在我的 winform 上运行控制台应用程序,从我的 win 表单上的文本框中提供控制台应用程序所需的 readkey 对不起我的英语不好

Yes, of course it is possible是的,当然可以

Check Process.Start() on MSDN检查 MSDN 上的 Process.Start()

https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.start?redirectedfrom=MSDN&view=netframework-4.8#System_Diagnostics_Process_Start_System_String_System_String_ https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.start?redirectedfrom=MSDN&view=netframework-4.8#System_Diagnostics_Process_Start_System_String_System_String_

Just start the process and pass your textbox value as argument只需启动该过程并将您的文本框值作为参数传递

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM