VB.net进程处理应用:使用进程运行其他的文件(等同vb的shell)。

发表于:2007-06-30来源:作者:点击数: 标签:
Dim myProcess As New Process() @#先定义一个进程变量

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        myProcess.StartInfo.FileName = "Notepad"
        myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
        myProcess.Start()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        myProcess.CloseMainWindow() @#关闭进程
    End Sub

原文转自:http://www.ltesting.net