Hi all, firstly i'll say im pretty new to vb.net so cut me some slack! I've started working on a small program which lists all the process's in a listview and gives you the option to end it by clicking a button. I've managed to list the process's but what im stuck on is trying to end it. The code i've got in my button is:
[code=vbnet]
dim proc as process
Try
proc = Process.GetProc essById(Listvie w.SelectedItems (0).Text)
proc.Kill()
Catch ex As Exception
MessageBox.Show (Convert.ToStri ng(ex))
End Try
End Sub
[/code]
But i get the error "conversion from string "process name" to type Integer is not valid". Any help would be appreciated :-)
[code=vbnet]
dim proc as process
Try
proc = Process.GetProc essById(Listvie w.SelectedItems (0).Text)
proc.Kill()
Catch ex As Exception
MessageBox.Show (Convert.ToStri ng(ex))
End Try
End Sub
[/code]
But i get the error "conversion from string "process name" to type Integer is not valid". Any help would be appreciated :-)
Comment