Visual Studio CefSharp最新版本获取方法
以visual studio2015为例,新建一个空winform项目,c#语言,然后: 在浏览标签页,输入cefsharp,点击 cefsharp.winforms : 在右侧,点击安装: 等待安装完成即可,然后在form窗体写下面的代码: [crayon- …
浏览标签
以visual studio2015为例,新建一个空winform项目,c#语言,然后: 在浏览标签页,输入cefsharp,点击 cefsharp.winforms : 在右侧,点击安装: 等待安装完成即可,然后在form窗体写下面的代码: [crayon- …
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<pre class="inline:true class:language-dotnet decode:1 " >Public Sub Main() '正在运行的MyPro.exe”的情况下,全部强制结束。 If ProcessOnN("MyPro") > 0 Then KillProcess("MyPro") End If End Sub Public Function ProcessOnN(ByVal ProcessName As String) As Integer '有“.EXE”的话删除 Dim s As String = ProcessName.ToUpper.Replace(".EXE", "").Trim '返回指定进程的个数 Return Process.GetProcessesByName(s).Length End Function Public Sub KillProcess(ByVal comObjProcessName As String) Dim mProcessList As Process() mProcessList = Process.GetProcessesByName(comObjProcessName) For Each tmpProcess As Process In mProcessList '有正在执行的“程序”时,全部强制结束 tmpProcess.Kill() Next End Sub |