(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.Select edIndex), nothing)
try
if listbox1.Select edIndex = -1 then
MessageBox.show ("Please select a Process")
else
proc.InvokeMeth od("Terminate" , method)
end if
Any Idea?s ???
thanks
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>foqnHOg7Vk2 Mc1AVqDQLWQ==</Id>