N
Newbie Coder
In C++.NET 2003 Windows Forms App
I fill a ListView control with process name & second column is the Process
ID.
I would like to kill the selected process, which is simple in VB.NET or C#,
but cannot work it out in C++.
In VB.NET, I'd do the following:
Dim intProcID As Int32
Dim Proc As New Process()
procID = (CInt(ListView1.SelectedItems(0).SubItems(1).Text))
Proc = Process.GetProcessById(procID)
Proc.Kill()
When trying to convert this code I get many compile errors. The C++ code I
am just typing in here & hasn't come from the VS 7.1 IDE:
Example:
SubItems aren't recognised
Kill isn't recognised either
If I create a string value to hold the ListView subitem then use
Convert::ToInt32... it still fails
Please help,
I fill a ListView control with process name & second column is the Process
ID.
I would like to kill the selected process, which is simple in VB.NET or C#,
but cannot work it out in C++.
In VB.NET, I'd do the following:
Dim intProcID As Int32
Dim Proc As New Process()
procID = (CInt(ListView1.SelectedItems(0).SubItems(1).Text))
Proc = Process.GetProcessById(procID)
Proc.Kill()
When trying to convert this code I get many compile errors. The C++ code I
am just typing in here & hasn't come from the VS 7.1 IDE:
Example:
SubItems aren't recognised
Kill isn't recognised either
If I create a string value to hold the ListView subitem then use
Convert::ToInt32... it still fails
Please help,