Windows窗体中的命令行 [英] Command Line in Windows Forms

查看:94
本文介绍了Windows窗体中的命令行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人,

我被要求创建一个窗口表单(或多个),允许最终用户在一个应用程序中运行多个命令行。基本上网络人员需要能够打开1个窗口,并且可以同时使用4个命令提示。

I have been asked to create a windows form (or multiple) that will allow the end user to run several command lines in one application.  Basically the network guys need to be able to have 1 window opened and have 4 command prompts available to use at once. 

我知道他们可以打开4个dos窗口,但这是一个很长的故事。

I know they could open 4 dos windows, but it's a long story.

我很高兴知道如何构建1.如何我可以在VB.NET 2005中创建一个Windows窗体并且基本上有一个dos提示符,等待用户输入吗?

I would be happy just to know how to build 1.  How can I make a windows form in VB.NET 2005 and have basically a dos prompt sitting there waiting for the user to type ?

谢谢。

推荐答案

你可以做到这一点但他们只能在提示通过你的应用程序输入输入时输入。

well you can do this BUT they can only type in when prompted to enter inputs via your application.

因此,如果您现在有一个项目,Winforms应用程序,右键单击该项目,然后转到属性。

So if you have a project right now, Winforms app, right click on the project then go to properties.

在"输出类型"中;选择"控制台应用程序"从下拉列表中,保存并编译 - 您的应用程序现在不仅会加载GUI,还会在后台有一个命令提示符,其中任何Console.Read()或Console.Write()语句都会写入您的代码中,重定向到那个命令提示符窗口

in the "Output Type" select "Console application" from the drop down list, save and compile - your application will now not only load the GUI but also have a command prompt in the background where any Console.Read() or Console.Write() statements are written in your code, will be re directed to that command prompt Window

这就是你所追求的?


这篇关于Windows窗体中的命令行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆