小人物 小经验 小技巧
小人物 小经验 小技巧
导航
博客园
首页
新随笔
联系
订阅
管理
统计
随笔 - 2
文章 - 0
评论 - 0
引用 - 0
公告
昵称:
crush
园龄:
5年7个月
粉丝:
0
关注:
0
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
随笔分类
C# .NET JScript .Net(1)
(rss)
随笔档案
2006年6月 (2)
最新评论
2006年6月9日
SSCLI 包含了微软的CLI ,C#,JScript....的源码,学习.Net的不看怎么行
Visual Studio 2005 的project 文件
SSCLI 包含了微软的CLI ,C#,JScript....的源码,学习.Net的不看怎么行
http://blogs.msdn.com/shawnfa/archive/2006/06/07/619136.aspx
The Shared Source CLI is a compressed archive of the source code to a working implementation of the ECMA CLI and the ECMA C# language specification. This implementation builds and runs on Windows XP.
http://www.microsoft.com/downloads/details.aspx?FamilyId=8C09FD61-3F26-4555-AE17-3121B4F51D4D&displaylang=en
posted @ 2006-06-09 11:07 crush 阅读(250) 评论(0)
编辑
C# 中启动进程的三种方法
1.启动子进程,不等待子进程结束
private
void
simpleRun_Click(
object
sender, System.EventArgs e)
{ System.Diagnostics.Process.Start(
@"
C:\listfiles.bat
"
);
}
2.启动子进程,等待子进程结束,并获得输出
1
private
void
runSyncAndGetResults_Click(
object
sender, System.EventArgs e)
2
{
3
System.Diagnostics.ProcessStartInfo psi
=
new
System.Diagnostics.ProcessStartInfo(
@"
C:\listfiles.bat
"
);
4
psi.RedirectStandardOutput
=
true
;
5
psi.WindowStyle
=
System.Diagnostics.ProcessWindowStyle.Hidden;
6
psi.UseShellExecute
=
false
;
7
System.Diagnostics.Process listFiles;
8
listFiles
=
System.Diagnostics.Process.Start(psi);
9
System.IO.StreamReader myOutput
=
listFiles.StandardOutput;
10
listFiles.WaitForExit(
2000
);
11
12
if
(listFiles.HasExited)
13
{
14
string
output
=
myOutput.ReadToEnd();
15
this
.processResults.Text
=
output;
16
}
17
}
18
3.使用默认的浏览器打开URL
1
private
void
launchURL_Click(
object
sender, System.EventArgs e)
2
{
3
string
targetURL
=
@http:
//
www.duncanmackenzie.net;
4
System.Diagnostics.Process.Start(targetURL);
5
}
6
posted @ 2006-06-09 10:45 crush 阅读(1007) 评论(0)
编辑