我正在尝试构建一个启动脚本,然后停止一个进程:
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Process.Start("C:\batchfile.bat")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
(DESIRED CODE HERE)
End Sub
End Class
Button2
启动batchfile.bat
. 我需要找到一种方法来在Button1
单击时结束此过程。有没有相对简单的方法来做到这一点?