P
Peter Neuburger via .NET 247
(Type your message here)
--------------------------------
From: Peter Neuburger
Hi Everybody,
I need some help with the WMI Terminate Method.
I have a Listbox where I get all the Process Information using the WMI Win32_process
class, that works fine.
Now I have a Stop Button that should terminate the process when I select it in the listbox
but I don?t really know how to write the Code, cause this don?t really work.
Code example:
Dim proc as ManagementClass("Win32_process")
Dim method() as Object = listbox1.items(listbox1.SelectedIndex), nothing)
try
if listbox1.SelectedIndex = -1 then
MessageBox.show ("Please select a Process")
else
proc.InvokeMethod("Terminate", method)
end if
Any Idea?s ???
thanks
--------------------------------
From: Peter Neuburger
Hi Everybody,
I need some help with the WMI Terminate Method.
I have a Listbox where I get all the Process Information using the WMI Win32_process
class, that works fine.
Now I have a Stop Button that should terminate the process when I select it in the listbox
but I don?t really know how to write the Code, cause this don?t really work.
Code example:
Dim proc as ManagementClass("Win32_process")
Dim method() as Object = listbox1.items(listbox1.SelectedIndex), nothing)
try
if listbox1.SelectedIndex = -1 then
MessageBox.show ("Please select a Process")
else
proc.InvokeMethod("Terminate", method)
end if
Any Idea?s ???
thanks