1

I am trying to launch a separate instance of my application with a new process ID. Is there any way to do this? The following code will show a separate form, but it shares the process ID of the original form:

Private Sub NewToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles NewToolStripMenuItem.Click
    Dim SecondForm As New MyForm()
    SecondForm.Show()
End Sub

I basically want to replicate the same behavior as opening the application when a user selects the New option from the tool strip menu.

user667118
  • 67
  • 10

1 Answers1

0

I found a solution for what I was trying to do.

Private Sub NewToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles NewToolStripMenuItem.Click        
    Dim ExePath As String = Application.ExecutablePath
    Process.Start(ExePath)
End Sub
user667118
  • 67
  • 10