没有合适的资源?快使用搜索试试~ 我知道了~
下面介绍一种常用的在C#程序中调用CMD.exe程序,并且不显示命令行窗口界面,来完成CMD中各种功能的简单方法
资源推荐
资源详情
资源评论
private void scanBtn_Click_1(object sender, EventArgs e)
{
if (textBox1.Text == "")
{
MessageBox.Show("请输入IP地址");
}
else
{
ThreadStart newThread = new ThreadStart(scan);//初始化线程
Thread th1 = new Thread(newThread);
th1.Start();
}
}
private void scan()
{
string str = " -O " + textBox1.Text;
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "nmap.exe";
richTextBox1.Text = " ";
progressBar1.Value = 0;
for (int i = 1; i < 400; i++)
{
this.progressBar1.PerformStep();
{
if (textBox1.Text == "")
{
MessageBox.Show("请输入IP地址");
}
else
{
ThreadStart newThread = new ThreadStart(scan);//初始化线程
Thread th1 = new Thread(newThread);
th1.Start();
}
}
private void scan()
{
string str = " -O " + textBox1.Text;
System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "nmap.exe";
richTextBox1.Text = " ";
progressBar1.Value = 0;
for (int i = 1; i < 400; i++)
{
this.progressBar1.PerformStep();
资源评论
U35793
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功