If I start a program via "Process.Start(c:\...)", is there a way of obtaining the "process name" of said program for use in "Process.GetProcessesByName(...).Length" or any other way?
Thanks!
Printable View
If I start a program via "Process.Start(c:\...)", is there a way of obtaining the "process name" of said program for use in "Process.GetProcessesByName(...).Length" or any other way?
Thanks!
This is why you should read the documentation for the types and methods you use. Doing that would have told you that Process.Start is a function, not a procedure. That means that it returns a value, which in this case is a Process object representing the process you just started. The Process class has a ProcessName property.
It says there is a Process.ProcessName property, I see that, but when I type it in, intellisense doesn't give me anything. Why would that be?
:confused:
Thanks. Remember, I am relatively new to VB. I am trying to do this myself as best I can. But really, thanks.