1
Hello, I am learning VB.net and would like help. I’m doing a little program to check if a process is open and if it’s not, open it.
I’ve come this far:
Private Sub CheckIfRunning()
p = Process.GetProcessesByName(TextBox1.Text)
If p.Length < 1 Then
Process.Start(TextBox1.Text)
End If
End Sub
The problem is that it keeps opening the process several times, even if it is already open. Someone can help me with this?
What is the content of
TextBox1.Text
?– Pedro Gaspar