<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FDevelopment%2FProcess</id>
		<title>VB.Net Tutorial/Development/Process - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net_Tutorial%2FDevelopment%2FProcess"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Development/Process&amp;action=history"/>
		<updated>2026-04-05T09:00:56Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Development/Process&amp;diff=2881&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Development/Process&amp;diff=2881&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:30Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Development/Process&amp;diff=2882&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net_Tutorial/Development/Process&amp;diff=2882&amp;oldid=prev"/>
				<updated>2010-05-26T12:53:39Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Display properties of current Process==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim objProcess As New Process()&lt;br /&gt;
        objProcess = Process.GetCurrentProcess()&lt;br /&gt;
        With objProcess&lt;br /&gt;
            Console.WriteLine(&amp;quot;Base Priority {0}&amp;quot;, .BasePriority)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Handle count {0}&amp;quot;, .HandleCount)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Process ID (PID) {0}&amp;quot;, .Id)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Machine Name {0}&amp;quot;, .MachineName)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Main Module {0}&amp;quot;, .MainModule)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Main Window Title {0}&amp;quot;, .MainWindowTitle)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Max Working Set {0}&amp;quot;, .MaxWorkingSet)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Min Working Set {0}&amp;quot;, .MinWorkingSet)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Modules {0}&amp;quot;, .Modules)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Nonpage System Memory Size {0}&amp;quot;,.NonpagedSystemMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Paged Memory Size {0}&amp;quot;, .PagedMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Paged System Memory Size {0}&amp;quot;,.PagedSystemMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Peak Paged Memory Size {0}&amp;quot;,.PeakPagedMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Peak Virtual Memory Size {0}&amp;quot;,.PeakVirtualMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Peak Working Set {0}&amp;quot;, .PeakWorkingSet)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Priority Boost Enabled {0}&amp;quot;, .PriorityBoostEnabled)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Priority Class {0}&amp;quot;, .PriorityClass)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Private Memory Size {0}&amp;quot;,.PrivateMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Priviledged Processsor Time {0}&amp;quot;,.PrivilegedProcessorTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Name {0}&amp;quot;, .ProcessName)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Processor Affinity {0}&amp;quot;, .ProcessorAffinity)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Start Time {0}&amp;quot;, .StartTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Total Processor Time {0}&amp;quot;, .TotalProcessorTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;User Processor Time {0}&amp;quot;, .UserProcessorTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Virtual Memory Size {0}&amp;quot;, .VirtualMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Working Set {0}&amp;quot;, .WorkingSet)&lt;br /&gt;
        End With&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Base Priority 8&lt;br /&gt;
Handle count 87&lt;br /&gt;
Process ID (PID) 3424&lt;br /&gt;
Machine Name .&lt;br /&gt;
Main Module System.Diagnostics.ProcessModule (main.exe)&lt;br /&gt;
Main Window Title&lt;br /&gt;
Max Working Set 1413120&lt;br /&gt;
Min Working Set 204800&lt;br /&gt;
Modules System.Diagnostics.ProcessModuleCollection&lt;br /&gt;
Nonpage System Memory Size 4508&lt;br /&gt;
Paged Memory Size 9330688&lt;br /&gt;
Paged System Memory Size 105068&lt;br /&gt;
Peak Paged Memory Size 9330688&lt;br /&gt;
Peak Virtual Memory Size 92123136&lt;br /&gt;
Peak Working Set 5308416&lt;br /&gt;
Priority Boost Enabled True&lt;br /&gt;
Priority Class Normal&lt;br /&gt;
Private Memory Size 9330688&lt;br /&gt;
Priviledged Processsor Time 00:00:00.0156250&lt;br /&gt;
Name main&lt;br /&gt;
Processor Affinity 1&lt;br /&gt;
Start Time 11/05/2007 9:33:28 PM&lt;br /&gt;
Total Processor Time 00:00:00.0781250&lt;br /&gt;
User Processor Time 00:00:00.0625000&lt;br /&gt;
Virtual Memory Size 92057600&lt;br /&gt;
Working Set 5308416&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Get current Process==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Dim objProcess As New Process()&lt;br /&gt;
        objProcess = Process.GetCurrentProcess()&lt;br /&gt;
        With objProcess&lt;br /&gt;
            Console.WriteLine(&amp;quot;Base Priority {0}&amp;quot;, .BasePriority)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Handle count {0}&amp;quot;, .HandleCount)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Process ID (PID) {0}&amp;quot;, .Id)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Machine Name {0}&amp;quot;, .MachineName)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Main Module {0}&amp;quot;, .MainModule)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Main Window Title {0}&amp;quot;, .MainWindowTitle)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Max Working Set {0}&amp;quot;, .MaxWorkingSet)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Min Working Set {0}&amp;quot;, .MinWorkingSet)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Modules {0}&amp;quot;, .Modules)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Nonpage System Memory Size {0}&amp;quot;,.NonpagedSystemMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Paged Memory Size {0}&amp;quot;, .PagedMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Paged System Memory Size {0}&amp;quot;,.PagedSystemMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Peak Paged Memory Size {0}&amp;quot;,.PeakPagedMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Peak Virtual Memory Size {0}&amp;quot;,.PeakVirtualMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Peak Working Set {0}&amp;quot;, .PeakWorkingSet)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Priority Boost Enabled {0}&amp;quot;, .PriorityBoostEnabled)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Priority Class {0}&amp;quot;, .PriorityClass)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Private Memory Size {0}&amp;quot;,.PrivateMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Priviledged Processsor Time {0}&amp;quot;,.PrivilegedProcessorTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Name {0}&amp;quot;, .ProcessName)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Processor Affinity {0}&amp;quot;, .ProcessorAffinity)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Start Time {0}&amp;quot;, .StartTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Total Processor Time {0}&amp;quot;, .TotalProcessorTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;User Processor Time {0}&amp;quot;, .UserProcessorTime)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Virtual Memory Size {0}&amp;quot;, .VirtualMemorySize)&lt;br /&gt;
            Console.WriteLine(&amp;quot;Working Set {0}&amp;quot;, .WorkingSet)&lt;br /&gt;
        End With&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Base Priority 8&lt;br /&gt;
Handle count 87&lt;br /&gt;
Process ID (PID) 2988&lt;br /&gt;
Machine Name .&lt;br /&gt;
Main Module System.Diagnostics.ProcessModule (main.exe)&lt;br /&gt;
Main Window Title&lt;br /&gt;
Max Working Set 1413120&lt;br /&gt;
Min Working Set 204800&lt;br /&gt;
Modules System.Diagnostics.ProcessModuleCollection&lt;br /&gt;
Nonpage System Memory Size 4508&lt;br /&gt;
Paged Memory Size 9330688&lt;br /&gt;
Paged System Memory Size 105068&lt;br /&gt;
Peak Paged Memory Size 9330688&lt;br /&gt;
Peak Virtual Memory Size 92123136&lt;br /&gt;
Peak Working Set 5308416&lt;br /&gt;
Priority Boost Enabled True&lt;br /&gt;
Priority Class Normal&lt;br /&gt;
Private Memory Size 9330688&lt;br /&gt;
Priviledged Processsor Time 00:00:00.0312500&lt;br /&gt;
Name main&lt;br /&gt;
Processor Affinity 1&lt;br /&gt;
Start Time 11/05/2007 9:33:27 PM&lt;br /&gt;
Total Processor Time 00:00:00.0781250&lt;br /&gt;
User Processor Time 00:00:00.0468750&lt;br /&gt;
Virtual Memory Size 92057600&lt;br /&gt;
Working Set 5308416&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Get Process by ID==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Public Class Tester&lt;br /&gt;
    Public Shared Sub Main&lt;br /&gt;
        Dim pid As Integer = 12345&lt;br /&gt;
        Dim p As Process = Process.GetProcessById(pid)&lt;br /&gt;
        If p Is Nothing Then Return&lt;br /&gt;
        Try&lt;br /&gt;
            Console.WriteLine(p.Id.ToString())&lt;br /&gt;
            Console.WriteLine(p.ProcessName)&lt;br /&gt;
            Console.WriteLine(p.StartTime.ToLongTimeString())&lt;br /&gt;
            Console.WriteLine(p.PriorityClass.ToString())&lt;br /&gt;
            Console.WriteLine(p.VirtualMemorySize64.ToString())&lt;br /&gt;
            Console.WriteLine(p.WorkingSet64.ToString())&lt;br /&gt;
            If p.MainModule IsNot Nothing Then&lt;br /&gt;
                Console.WriteLine(p.MainModule.FileName)&lt;br /&gt;
                Console.WriteLine(p.MainModule.FileVersionInfo.FileDescription)&lt;br /&gt;
                Console.WriteLine(p.MainModule.FileVersionInfo.FileVersion)&lt;br /&gt;
            End If&lt;br /&gt;
        Catch ex As Exception&lt;br /&gt;
            Console.WriteLine(ex.Message)&lt;br /&gt;
        Finally&lt;br /&gt;
            p.Close()&lt;br /&gt;
        End Try    &lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Unhandled Exception: System.ArgumentException: Process with an Id of 12345 is not running.&lt;br /&gt;
   at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)&lt;br /&gt;
   at System.Diagnostics.Process.GetProcessById(Int32 processId)&lt;br /&gt;
   at Tester.Main()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Get thread count in current process==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
        Console.WriteLine(&amp;quot;Thread Count: {0}&amp;quot;, Process.GetCurrentProcess().Threads.Count)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Thread Count: 3&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Kill current process==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
&amp;quot;       Process.GetCurrentProcess.Kill()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==List all process in a ListView==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class ProcessManager&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New Form1)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Private Sub ListProcesses()&lt;br /&gt;
        Dim ps() As Process&lt;br /&gt;
        Try&lt;br /&gt;
            ps = Process.GetProcesses()&lt;br /&gt;
            lvProcesses.BeginUpdate()&lt;br /&gt;
            lvProcesses.Clear()&lt;br /&gt;
            lvProcesses.Columns.Add(&amp;quot;Name&amp;quot;, 100, HorizontalAlignment.Left)&lt;br /&gt;
            lvProcesses.Columns.Add(&amp;quot;ID&amp;quot;, 60, HorizontalAlignment.Left)&lt;br /&gt;
            lvProcesses.Columns.Add(&amp;quot;Priority&amp;quot;, 60, HorizontalAlignment.Right)&lt;br /&gt;
            lvProcesses.Columns.Add(&amp;quot;Memory&amp;quot;, 100, HorizontalAlignment.Right)&lt;br /&gt;
            Dim p As Process&lt;br /&gt;
            For Each p In ps&lt;br /&gt;
                Dim lvi As ListViewItem = New ListViewItem()&lt;br /&gt;
                lvi.Text = p.ProcessName&lt;br /&gt;
                lvi.SubItems.Add(p.Id.ToString())&lt;br /&gt;
                lvi.SubItems.Add(p.BasePriority.ToString())&lt;br /&gt;
                lvi.SubItems.Add(p.WorkingSet64.ToString())&lt;br /&gt;
                lvProcesses.Items.Add(lvi)&lt;br /&gt;
            Next p&lt;br /&gt;
            lvProcesses.EndUpdate()&lt;br /&gt;
        Catch e As Exception&lt;br /&gt;
            MessageBox.Show(e.Message)&lt;br /&gt;
        End Try&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        ListProcesses()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnKillProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKillProcess.Click&lt;br /&gt;
        If MessageBox.Show(Me, &amp;quot;Stop Process&amp;quot; + lvProcesses.SelectedItems(0).Text, &amp;quot;Stop&amp;quot;, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) = DialogResult.Cancel Then&lt;br /&gt;
            Return&lt;br /&gt;
        End If&lt;br /&gt;
        Dim pid As Integer = Int32.Parse(lvProcesses.SelectedItems(0).SubItems(1).Text)&lt;br /&gt;
        Dim p As Process = Process.GetProcessById(pid)&lt;br /&gt;
        If p Is Nothing Then Return&lt;br /&gt;
        If Not p.CloseMainWindow() Then p.Kill()&lt;br /&gt;
        p.WaitForExit()&lt;br /&gt;
        p.Close()&lt;br /&gt;
        ListProcesses()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefresh.Click&lt;br /&gt;
        ListProcesses()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.btnRefresh = New System.Windows.Forms.Button&lt;br /&gt;
        Me.label1 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.btnKillProcess = New System.Windows.Forms.Button&lt;br /&gt;
        Me.btnNewProcess = New System.Windows.Forms.Button&lt;br /&gt;
        Me.lvProcesses = New System.Windows.Forms.ListView&lt;br /&gt;
        Me.btnProcessProp = New System.Windows.Forms.Button&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnRefresh&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnRefresh.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft&lt;br /&gt;
        Me.btnRefresh.Location = New System.Drawing.Point(557, 11)&lt;br /&gt;
        Me.btnRefresh.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.btnRefresh.Name = &amp;quot;btnRefresh&amp;quot;&lt;br /&gt;
        Me.btnRefresh.Size = New System.Drawing.Size(116, 35)&lt;br /&gt;
        Me.btnRefresh.TabIndex = 11&lt;br /&gt;
        Me.btnRefresh.Text = &amp;quot;Refresh(&amp;amp;R)&amp;quot;&lt;br /&gt;
        Me.btnRefresh.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.label1.AutoSize = True&lt;br /&gt;
        Me.label1.Location = New System.Drawing.Point(13, 24)&lt;br /&gt;
        Me.label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)&lt;br /&gt;
        Me.label1.Name = &amp;quot;label1&amp;quot;&lt;br /&gt;
        Me.label1.Size = New System.Drawing.Size(112, 15)&lt;br /&gt;
        Me.label1.TabIndex = 10&lt;br /&gt;
        Me.label1.Text = &amp;quot;Processes&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnKillProcess&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnKillProcess.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft&lt;br /&gt;
        Me.btnKillProcess.Location = New System.Drawing.Point(509, 347)&lt;br /&gt;
        Me.btnKillProcess.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.btnKillProcess.Name = &amp;quot;btnKillProcess&amp;quot;&lt;br /&gt;
        Me.btnKillProcess.Size = New System.Drawing.Size(164, 29)&lt;br /&gt;
        Me.btnKillProcess.TabIndex = 9&lt;br /&gt;
        Me.btnKillProcess.Text = &amp;quot;Stop(&amp;amp;K)&amp;quot;&lt;br /&gt;
        Me.btnKillProcess.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnNewProcess&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnNewProcess.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft&lt;br /&gt;
        Me.btnNewProcess.Location = New System.Drawing.Point(362, 347)&lt;br /&gt;
        Me.btnNewProcess.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.btnNewProcess.Name = &amp;quot;btnNewProcess&amp;quot;&lt;br /&gt;
        Me.btnNewProcess.Size = New System.Drawing.Size(139, 29)&lt;br /&gt;
        Me.btnNewProcess.TabIndex = 8&lt;br /&gt;
        Me.btnNewProcess.Text = &amp;quot;New(&amp;amp;N)&amp;quot;&lt;br /&gt;
        Me.btnNewProcess.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;lvProcesses&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.lvProcesses.Location = New System.Drawing.Point(13, 54)&lt;br /&gt;
        Me.lvProcesses.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.lvProcesses.MultiSelect = False&lt;br /&gt;
        Me.lvProcesses.Name = &amp;quot;lvProcesses&amp;quot;&lt;br /&gt;
        Me.lvProcesses.Size = New System.Drawing.Size(659, 285)&lt;br /&gt;
        Me.lvProcesses.TabIndex = 7&lt;br /&gt;
        Me.lvProcesses.UseCompatibleStateImageBehavior = False&lt;br /&gt;
        Me.lvProcesses.View = System.Windows.Forms.View.Details&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnProcessProp&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnProcessProp.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft&lt;br /&gt;
        Me.btnProcessProp.Location = New System.Drawing.Point(32, 347)&lt;br /&gt;
        Me.btnProcessProp.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.btnProcessProp.Name = &amp;quot;btnProcessProp&amp;quot;&lt;br /&gt;
        Me.btnProcessProp.Size = New System.Drawing.Size(153, 29)&lt;br /&gt;
        Me.btnProcessProp.TabIndex = 6&lt;br /&gt;
        Me.btnProcessProp.Text = &amp;quot;Properties(&amp;amp;P)&amp;quot;&lt;br /&gt;
        Me.btnProcessProp.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;Form1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(679, 395)&lt;br /&gt;
        Me.Controls.Add(Me.btnRefresh)&lt;br /&gt;
        Me.Controls.Add(Me.label1)&lt;br /&gt;
        Me.Controls.Add(Me.btnKillProcess)&lt;br /&gt;
        Me.Controls.Add(Me.btnNewProcess)&lt;br /&gt;
        Me.Controls.Add(Me.lvProcesses)&lt;br /&gt;
        Me.Controls.Add(Me.btnProcessProp)&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private WithEvents btnRefresh As System.Windows.Forms.Button&lt;br /&gt;
    Private WithEvents label1 As System.Windows.Forms.Label&lt;br /&gt;
    Private WithEvents btnKillProcess As System.Windows.Forms.Button&lt;br /&gt;
    Private WithEvents btnNewProcess As System.Windows.Forms.Button&lt;br /&gt;
    Private WithEvents lvProcesses As System.Windows.Forms.ListView&lt;br /&gt;
    Private WithEvents btnProcessProp As System.Windows.Forms.Button&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Open Default editor for text file==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
public class Test&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Dim new_process As New Process&lt;br /&gt;
        new_process.StartInfo.FileName = &amp;quot;test.txt&amp;quot;&lt;br /&gt;
        new_process.StartInfo.Verb = &amp;quot;Open&amp;quot;&lt;br /&gt;
        new_process.Start()&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Print properties of Process==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Public Class Tester&lt;br /&gt;
    Public Shared Sub Main&lt;br /&gt;
        Dim pid As Integer = 12345&lt;br /&gt;
        Dim p As Process = Process.GetProcessById(pid)&lt;br /&gt;
        If p Is Nothing Then Return&lt;br /&gt;
        Try&lt;br /&gt;
            Console.WriteLine(p.Id.ToString())&lt;br /&gt;
            Console.WriteLine(p.ProcessName)&lt;br /&gt;
            Console.WriteLine(p.StartTime.ToLongTimeString())&lt;br /&gt;
            Console.WriteLine(p.PriorityClass.ToString())&lt;br /&gt;
            Console.WriteLine(p.VirtualMemorySize64.ToString())&lt;br /&gt;
            Console.WriteLine(p.WorkingSet64.ToString())&lt;br /&gt;
            If p.MainModule IsNot Nothing Then&lt;br /&gt;
                Console.WriteLine(p.MainModule.FileName)&lt;br /&gt;
                Console.WriteLine(p.MainModule.FileVersionInfo.FileDescription)&lt;br /&gt;
                Console.WriteLine(p.MainModule.FileVersionInfo.FileVersion)&lt;br /&gt;
            End If&lt;br /&gt;
        Catch ex As Exception&lt;br /&gt;
            Console.WriteLine(ex.Message)&lt;br /&gt;
        Finally&lt;br /&gt;
            p.Close()&lt;br /&gt;
        End Try    &lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Unhandled Exception: System.ArgumentException: Process with an Id of 12345 is not running.&lt;br /&gt;
   at System.Diagnostics.Process.GetProcessById(Int32 processId, String machineName)&lt;br /&gt;
   at System.Diagnostics.Process.GetProcessById(Int32 processId)&lt;br /&gt;
   at Tester.Main()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Start a process==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
public class ProcessStartForm&lt;br /&gt;
   public Shared Sub Main&lt;br /&gt;
        Application.Run(New FormStartInfo)&lt;br /&gt;
   End Sub&lt;br /&gt;
End class&lt;br /&gt;
Public Class FormStartInfo&lt;br /&gt;
    Private Sub ListVerb(ByVal filename As String)&lt;br /&gt;
        cbxVerb.Items.Clear()&lt;br /&gt;
        Dim sinfo As ProcessStartInfo = New ProcessStartInfo(filename)&lt;br /&gt;
        cbxVerb.Items.AddRange(sinfo.Verbs)&lt;br /&gt;
    End Sub&lt;br /&gt;
&lt;br /&gt;
    Private Sub FormStartInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
        cbxStyle.SelectedIndex = 2&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub txtFileName_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtFileName.Leave&lt;br /&gt;
        ListVerb(txtFileName.Text)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnExplorer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExplorer.Click&lt;br /&gt;
        Dim dlg As OpenFileDialog = New OpenFileDialog()&lt;br /&gt;
        dlg.CheckFileExists = True&lt;br /&gt;
        dlg.Filter = &amp;quot;(*.exe)|*.exe|(*.*)|*.*&amp;quot;&lt;br /&gt;
        If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then&lt;br /&gt;
            txtFileName.Text = dlg.FileName&lt;br /&gt;
            ListVerb(dlg.FileName)&lt;br /&gt;
        End If&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click&lt;br /&gt;
        Dim si As ProcessStartInfo = New ProcessStartInfo()&lt;br /&gt;
        si.FileName = txtFileName.Text&lt;br /&gt;
        si.Arguments = txtParam.Text&lt;br /&gt;
        si.ErrorDialog = chkErrDlg.Checked&lt;br /&gt;
        si.UseShellExecute = chkUseShell.Checked&lt;br /&gt;
        If cbxVerb.SelectedIndex &amp;lt;&amp;gt; -1 Then si.Verb = cbxVerb.Text&lt;br /&gt;
        si.WorkingDirectory = txtWorkDir.Text&lt;br /&gt;
        If cbxStyle.SelectedIndex = 0 Then&lt;br /&gt;
            si.WindowStyle = ProcessWindowStyle.Maximized&lt;br /&gt;
        ElseIf cbxStyle.SelectedIndex = 1 Then&lt;br /&gt;
            si.WindowStyle = ProcessWindowStyle.Minimized&lt;br /&gt;
        Else&lt;br /&gt;
            si.WindowStyle = ProcessWindowStyle.Normal&lt;br /&gt;
        End If&lt;br /&gt;
        Try&lt;br /&gt;
            Process.Start(si)&lt;br /&gt;
        Catch ex As Exception&lt;br /&gt;
            Console.WriteLine(ex.Message)&lt;br /&gt;
        End Try&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
&amp;lt;Global.Microsoft.VisualBasic.rupilerServices.DesignerGenerated()&amp;gt; _&lt;br /&gt;
Partial Class FormStartInfo&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerNonUserCode()&amp;gt; _&lt;br /&gt;
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)&lt;br /&gt;
        If disposing AndAlso components IsNot Nothing Then&lt;br /&gt;
            components.Dispose()&lt;br /&gt;
        End If&lt;br /&gt;
        MyBase.Dispose(disposing)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private components As System.ruponentModel.IContainer&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; _&lt;br /&gt;
    Private Sub InitializeComponent()&lt;br /&gt;
        Me.cbxStyle = New System.Windows.Forms.ruboBox&lt;br /&gt;
        Me.cbxVerb = New System.Windows.Forms.ruboBox&lt;br /&gt;
        Me.txtWorkDir = New System.Windows.Forms.TextBox&lt;br /&gt;
        Me.txtParam = New System.Windows.Forms.TextBox&lt;br /&gt;
        Me.btnCancel = New System.Windows.Forms.Button&lt;br /&gt;
        Me.btnOK = New System.Windows.Forms.Button&lt;br /&gt;
        Me.chkErrDlg = New System.Windows.Forms.CheckBox&lt;br /&gt;
        Me.chkUseShell = New System.Windows.Forms.CheckBox&lt;br /&gt;
        Me.label5 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.label4 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.label3 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.label2 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.btnExplorer = New System.Windows.Forms.Button&lt;br /&gt;
        Me.txtFileName = New System.Windows.Forms.TextBox&lt;br /&gt;
        Me.label1 = New System.Windows.Forms.Label&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;cbxStyle&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.cbxStyle.DropDownStyle = System.Windows.Forms.ruboBoxStyle.DropDownList&lt;br /&gt;
        Me.cbxStyle.FormattingEnabled = True&lt;br /&gt;
        Me.cbxStyle.Items.AddRange(New Object() {&amp;quot;Maximized&amp;quot;, &amp;quot;Minimized&amp;quot;, &amp;quot;Regular&amp;quot;})&lt;br /&gt;
        Me.cbxStyle.Location = New System.Drawing.Point(109, 134)&lt;br /&gt;
        Me.cbxStyle.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.cbxStyle.Name = &amp;quot;cbxStyle&amp;quot;&lt;br /&gt;
        Me.cbxStyle.Size = New System.Drawing.Size(487, 23)&lt;br /&gt;
        Me.cbxStyle.TabIndex = 29&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;cbxVerb&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.cbxVerb.DropDownStyle = System.Windows.Forms.ruboBoxStyle.DropDownList&lt;br /&gt;
        Me.cbxVerb.FormattingEnabled = True&lt;br /&gt;
        Me.cbxVerb.Location = New System.Drawing.Point(109, 105)&lt;br /&gt;
        Me.cbxVerb.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.cbxVerb.Name = &amp;quot;cbxVerb&amp;quot;&lt;br /&gt;
        Me.cbxVerb.Size = New System.Drawing.Size(487, 23)&lt;br /&gt;
        Me.cbxVerb.TabIndex = 28&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;txtWorkDir&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.txtWorkDir.Location = New System.Drawing.Point(109, 166)&lt;br /&gt;
        Me.txtWorkDir.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.txtWorkDir.Name = &amp;quot;txtWorkDir&amp;quot;&lt;br /&gt;
        Me.txtWorkDir.Size = New System.Drawing.Size(487, 25)&lt;br /&gt;
        Me.txtWorkDir.TabIndex = 27&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;txtParam&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.txtParam.Location = New System.Drawing.Point(109, 71)&lt;br /&gt;
        Me.txtParam.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.txtParam.Name = &amp;quot;txtParam&amp;quot;&lt;br /&gt;
        Me.txtParam.Size = New System.Drawing.Size(487, 25)&lt;br /&gt;
        Me.txtParam.TabIndex = 26&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnCancel&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel&lt;br /&gt;
        Me.btnCancel.Location = New System.Drawing.Point(358, 266)&lt;br /&gt;
        Me.btnCancel.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.btnCancel.Name = &amp;quot;btnCancel&amp;quot;&lt;br /&gt;
        Me.btnCancel.Size = New System.Drawing.Size(100, 29)&lt;br /&gt;
        Me.btnCancel.TabIndex = 25&lt;br /&gt;
        Me.btnCancel.Text = &amp;quot;Cancel(&amp;amp;C)&amp;quot;&lt;br /&gt;
        Me.btnCancel.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnOK&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK&lt;br /&gt;
        Me.btnOK.Location = New System.Drawing.Point(174, 266)&lt;br /&gt;
        Me.btnOK.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.btnOK.Name = &amp;quot;btnOK&amp;quot;&lt;br /&gt;
        Me.btnOK.Size = New System.Drawing.Size(100, 29)&lt;br /&gt;
        Me.btnOK.TabIndex = 24&lt;br /&gt;
        Me.btnOK.Text = &amp;quot;OK(&amp;amp;O)&amp;quot;&lt;br /&gt;
        Me.btnOK.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;chkErrDlg&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.chkErrDlg.AutoSize = True&lt;br /&gt;
        Me.chkErrDlg.Location = New System.Drawing.Point(16, 239)&lt;br /&gt;
        Me.chkErrDlg.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.chkErrDlg.Name = &amp;quot;chkErrDlg&amp;quot;&lt;br /&gt;
        Me.chkErrDlg.Size = New System.Drawing.Size(134, 19)&lt;br /&gt;
        Me.chkErrDlg.TabIndex = 23&lt;br /&gt;
        Me.chkErrDlg.Text = &amp;quot;Error Dialog&amp;quot;&lt;br /&gt;
        Me.chkErrDlg.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;chkUseShell&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.chkUseShell.AutoSize = True&lt;br /&gt;
        Me.chkUseShell.Location = New System.Drawing.Point(16, 211)&lt;br /&gt;
        Me.chkUseShell.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.chkUseShell.Name = &amp;quot;chkUseShell&amp;quot;&lt;br /&gt;
        Me.chkUseShell.Size = New System.Drawing.Size(209, 19)&lt;br /&gt;
        Me.chkUseShell.TabIndex = 22&lt;br /&gt;
        Me.chkUseShell.Text = &amp;quot;Start Process&amp;quot;&lt;br /&gt;
        Me.chkUseShell.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;label5&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.label5.AutoSize = True&lt;br /&gt;
        Me.label5.Location = New System.Drawing.Point(13, 173)&lt;br /&gt;
        Me.label5.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)&lt;br /&gt;
        Me.label5.Name = &amp;quot;label5&amp;quot;&lt;br /&gt;
        Me.label5.Size = New System.Drawing.Size(82, 15)&lt;br /&gt;
        Me.label5.TabIndex = 21&lt;br /&gt;
        Me.label5.Text = &amp;quot;Dir:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;label4&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.label4.AutoSize = True&lt;br /&gt;
        Me.label4.Location = New System.Drawing.Point(13, 140)&lt;br /&gt;
        Me.label4.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)&lt;br /&gt;
        Me.label4.Name = &amp;quot;label4&amp;quot;&lt;br /&gt;
        Me.label4.Size = New System.Drawing.Size(82, 15)&lt;br /&gt;
        Me.label4.TabIndex = 20&lt;br /&gt;
        Me.label4.Text = &amp;quot;Window style&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;label3&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.label3.AutoSize = True&lt;br /&gt;
        Me.label3.Location = New System.Drawing.Point(12, 110)&lt;br /&gt;
        Me.label3.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)&lt;br /&gt;
        Me.label3.Name = &amp;quot;label3&amp;quot;&lt;br /&gt;
        Me.label3.Size = New System.Drawing.Size(52, 15)&lt;br /&gt;
        Me.label3.TabIndex = 19&lt;br /&gt;
        Me.label3.Text = &amp;quot;Predicate&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;label2&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.label2.AutoSize = True&lt;br /&gt;
        Me.label2.Location = New System.Drawing.Point(12, 76)&lt;br /&gt;
        Me.label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)&lt;br /&gt;
        Me.label2.Name = &amp;quot;label2&amp;quot;&lt;br /&gt;
        Me.label2.Size = New System.Drawing.Size(52, 15)&lt;br /&gt;
        Me.label2.TabIndex = 18&lt;br /&gt;
        Me.label2.Text = &amp;quot;Parameter&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;btnExplorer&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.btnExplorer.Location = New System.Drawing.Point(502, 27)&lt;br /&gt;
        Me.btnExplorer.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.btnExplorer.Name = &amp;quot;btnExplorer&amp;quot;&lt;br /&gt;
        Me.btnExplorer.Size = New System.Drawing.Size(100, 29)&lt;br /&gt;
        Me.btnExplorer.TabIndex = 17&lt;br /&gt;
        Me.btnExplorer.Text = &amp;quot;Browser.&amp;quot;&lt;br /&gt;
        Me.btnExplorer.UseVisualStyleBackColor = True&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;txtFileName&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.txtFileName.Location = New System.Drawing.Point(9, 27)&lt;br /&gt;
        Me.txtFileName.Margin = New System.Windows.Forms.Padding(4)&lt;br /&gt;
        Me.txtFileName.Name = &amp;quot;txtFileName&amp;quot;&lt;br /&gt;
        Me.txtFileName.Size = New System.Drawing.Size(484, 25)&lt;br /&gt;
        Me.txtFileName.TabIndex = 16&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;label1&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.label1.AutoSize = True&lt;br /&gt;
        Me.label1.Location = New System.Drawing.Point(13, 9)&lt;br /&gt;
        Me.label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)&lt;br /&gt;
        Me.label1.Name = &amp;quot;label1&amp;quot;&lt;br /&gt;
        Me.label1.Size = New System.Drawing.Size(307, 15)&lt;br /&gt;
        Me.label1.TabIndex = 15&lt;br /&gt;
        Me.label1.Text = &amp;quot;Executable file name&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        &amp;quot;FormStartInfo&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)&lt;br /&gt;
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(612, 306)&lt;br /&gt;
        Me.Controls.Add(Me.cbxStyle)&lt;br /&gt;
        Me.Controls.Add(Me.cbxVerb)&lt;br /&gt;
        Me.Controls.Add(Me.txtWorkDir)&lt;br /&gt;
        Me.Controls.Add(Me.txtParam)&lt;br /&gt;
        Me.Controls.Add(Me.btnCancel)&lt;br /&gt;
        Me.Controls.Add(Me.btnOK)&lt;br /&gt;
        Me.Controls.Add(Me.chkErrDlg)&lt;br /&gt;
        Me.Controls.Add(Me.chkUseShell)&lt;br /&gt;
        Me.Controls.Add(Me.label5)&lt;br /&gt;
        Me.Controls.Add(Me.label4)&lt;br /&gt;
        Me.Controls.Add(Me.label3)&lt;br /&gt;
        Me.Controls.Add(Me.label2)&lt;br /&gt;
        Me.Controls.Add(Me.btnExplorer)&lt;br /&gt;
        Me.Controls.Add(Me.txtFileName)&lt;br /&gt;
        Me.Controls.Add(Me.label1)&lt;br /&gt;
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog&lt;br /&gt;
        Me.MaximizeBox = False&lt;br /&gt;
        Me.MinimizeBox = False&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
        Me.PerformLayout()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private WithEvents cbxStyle As System.Windows.Forms.ruboBox&lt;br /&gt;
    Private WithEvents cbxVerb As System.Windows.Forms.ruboBox&lt;br /&gt;
    Private WithEvents txtWorkDir As System.Windows.Forms.TextBox&lt;br /&gt;
    Private WithEvents txtParam As System.Windows.Forms.TextBox&lt;br /&gt;
    Private WithEvents btnCancel As System.Windows.Forms.Button&lt;br /&gt;
    Private WithEvents btnOK As System.Windows.Forms.Button&lt;br /&gt;
    Private WithEvents chkErrDlg As System.Windows.Forms.CheckBox&lt;br /&gt;
    Private WithEvents chkUseShell As System.Windows.Forms.CheckBox&lt;br /&gt;
    Private WithEvents label5 As System.Windows.Forms.Label&lt;br /&gt;
    Private WithEvents label4 As System.Windows.Forms.Label&lt;br /&gt;
    Private WithEvents label3 As System.Windows.Forms.Label&lt;br /&gt;
    Private WithEvents label2 As System.Windows.Forms.Label&lt;br /&gt;
    Private WithEvents btnExplorer As System.Windows.Forms.Button&lt;br /&gt;
    Private WithEvents txtFileName As System.Windows.Forms.TextBox&lt;br /&gt;
    Private WithEvents label1 As System.Windows.Forms.Label&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Start main module in current process==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Imports System.Diagnostics&lt;br /&gt;
Module Module1&lt;br /&gt;
    Sub Main()&lt;br /&gt;
&amp;quot;        Process.Start(Process.GetCurrentProcess().MainModule.FileName)&lt;br /&gt;
    End Sub&lt;br /&gt;
End Module&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Start process by setting file name==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;Public Class Tester&lt;br /&gt;
    Public Shared Sub Main&lt;br /&gt;
    &lt;br /&gt;
        Dim proc As System.Diagnostics.Process&lt;br /&gt;
        proc = New System.Diagnostics.Process()&lt;br /&gt;
        proc.StartInfo.FileName = &amp;quot;c:\\text.txt&amp;quot;&lt;br /&gt;
        proc.Start()&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;pre class=codeResult&amp;gt;Unhandled Exception: System.ruponentModel.Win32Exception: The system cannot find the file specified&lt;br /&gt;
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)&lt;br /&gt;
   at System.Diagnostics.Process.Start()&lt;br /&gt;
   at Tester.Main()&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>