Jump to content

  •  

  • iBotModz CBox


    Photo

    Listbox items [HELP]


    • Please log in to reply
    4 replies to this topic

    #1 ixGAMEOVERxixx

    ixGAMEOVERxixx

      Private Grade 2

    • VIP

    • 478 posts
    • Joined: 27-October 08
    • Gender:Not Telling
    • Location:Custom Games

    Posted 04 September 2009 - 03:13 PM

    Hello, as you may already know, I am not the best person at VB.net ever.. And for that reason I need some help...

    I have the following code

    If Process.GetProcessesByName("Testing").Length = 0 Then
                Text = "RuneSafe"
            Else
                Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName(value = instance.Items)
    
                For Each p As Process In pProcess
                    p.Kill()
                Next
                MsgBox("A threat was detected, and has been terminated.")
            End If

    Which checks to see if there is a application running called "Testing.exe". Now, I want to make it so instead of checking for applications called "Testing.exe" I want it to check for applications that are in the listbox.. This means every item, not just the first one - Anyone know how to accomplish this? I tried Listbox1.items.toString but that didn't work.

    +REP if you help.

    Thanks, Robert.

    #2 wil

    wil

      Private

    • Members+

    • 45 posts
    • Joined: 04-August 09
    • Gender:Male
    • Location:Nottingham, UK.

    Posted 04 September 2009 - 05:09 PM

    Rob why on earth are you making a runescape anti-virus? Anyway just use a text file in a hidden folder and right all the things in there. Actually someone might accidentally delete the text file :p, Can i make some graphics for your program please :D

    Edited by wil, 04 September 2009 - 05:26 PM.


    #3 AngryKoconut

    AngryKoconut

      Apprentice Grade 2

    • Members+

    • 21 posts
    • Joined: 13-June 08
    • Gender:Male
    • Location:hot tubin

    Posted 04 September 2009 - 05:21 PM

    For Each lc As ListControl In ListBox1.Items
    �  �  For Each p As System.Diagnostics.Process In System.Diagnostics.Process.GetProcesses()
    �  �  �  �  Try
    �  �  �  �  �  �  If (p.MainWindowTitle.Contains(lc.Text)) Then p.Kill()
    �  �  �  �  �  �  If (p.ProcessName.Contains(lc.Text)) Then p.Kill()
    �  �  �  �  Catch
    �  �  �  �  End Try
    �  �  Next
    Next

    Rename the ListBox1 to the name of your listbox. :)

    #4 ixGAMEOVERxixx

    ixGAMEOVERxixx

      Private Grade 2

    • VIP

    • 478 posts
    • Joined: 27-October 08
    • Gender:Not Telling
    • Location:Custom Games

    Posted 04 September 2009 - 05:40 PM

    For Each lc As ListControl In ListBox1.Items
    �  �  For Each p As System.Diagnostics.Process In System.Diagnostics.Process.GetProcesses()
    �  �  �  �  Try
    �  �  �  �  �  �  If (p.MainWindowTitle.Contains(lc.Text)) Then p.Kill()
    �  �  �  �  �  �  If (p.ProcessName.Contains(lc.Text)) Then p.Kill()
    �  �  �  �  Catch
    �  �  �  �  End Try
    �  �  Next
    Next

    Rename the ListBox1 to the name of your listbox. :)


    Its not killing the process.

    #5 AngryKoconut

    AngryKoconut

      Apprentice Grade 2

    • Members+

    • 21 posts
    • Joined: 13-June 08
    • Gender:Male
    • Location:hot tubin

    Posted 04 September 2009 - 05:48 PM

    For Each item As String In lb1.Items
    �  �  For Each p As System.Diagnostics.Process In System.Diagnostics.Process.GetProcesses()
    �  �  �  �  Try
    �  �  �  �  �  �  If (p.MainWindowTitle.Contains(item)) Then p.Kill()
    �  �  �  �  �  �  If (p.ProcessName.Contains(item)) Then p.Kill()
    �  �  �  �  Catch
    �  �  �  �  End Try
    �  �  Next
    Next

    :)

    Edited by AngryKoconut, 04 September 2009 - 05:48 PM.