Results 1 to 8 of 8
  1. #1
    FatCat00's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    78
    Reputation
    10
    Thanks
    10
    My Mood
    Bitchy

    [Help] Extract Filename From Listbox[Solved]

    I need help extracting the filename from an item on a listbox
    Code:
    Ex. C:\Documents and Settings\User\My Documents\Test.txt
    i want to extract the "Test.txt" into a second listbox any ideas?
    Quote Originally Posted by Benzoboy View Post
    can anyone help me find a download for perX? What is PerX.

    Help Quick.

    Thanks very much!! :]
    Quote Originally Posted by Casavir View Post
    I keep answering the same shit every day
    don't u choobs know the usage of the button called 'Search' ?I suppose not
    when something is approved,it's not a virus
    Got it retard?
    Quote Originally Posted by juan1212 View Post
    where is the search button?

    OWNED

  2. #2
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    "Extract"?

    Listbox2.items.add (Listbox1.Items.indexof(0))

    Something like that, amirite?

  3. #3
    FatCat00's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    78
    Reputation
    10
    Thanks
    10
    My Mood
    Bitchy
    i tried the code, but all it gave me in return was an integer D:
    Quote Originally Posted by Benzoboy View Post
    can anyone help me find a download for perX? What is PerX.

    Help Quick.

    Thanks very much!! :]
    Quote Originally Posted by Casavir View Post
    I keep answering the same shit every day
    don't u choobs know the usage of the button called 'Search' ?I suppose not
    when something is approved,it's not a virus
    Got it retard?
    Quote Originally Posted by juan1212 View Post
    where is the search button?

    OWNED

  4. #4
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,033
    Reputation
    340
    Thanks
    2,792
    My Mood
    Sad
    Listbox2.Items.Add(ListBox1.Items(0).Substring(Lis tbox1.Items.LastIndexOf("\")))

  5. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Yeah it would only return an integer, seeing as all he did was search for the index of an integer, which your ListBox may not even contain.

    Try something like this.
    [php]
    For each lbItem As String in ListBox1.Items
    ListBox2.Items.Add(IO.Path.GetFileName(lbItem))
    Next
    [/php]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  6. The Following User Says Thank You to Jason For This Useful Post:

    FatCat00 (10-24-2010)

  7. #6
    FatCat00's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    78
    Reputation
    10
    Thanks
    10
    My Mood
    Bitchy
    Thanx Jason /
    Quote Originally Posted by Benzoboy View Post
    can anyone help me find a download for perX? What is PerX.

    Help Quick.

    Thanks very much!! :]
    Quote Originally Posted by Casavir View Post
    I keep answering the same shit every day
    don't u choobs know the usage of the button called 'Search' ?I suppose not
    when something is approved,it's not a virus
    Got it retard?
    Quote Originally Posted by juan1212 View Post
    where is the search button?

    OWNED

  8. #7
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by FatCat00 View Post
    Thanx Jason /
    Not a problem.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  9. #8
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    Mkay solved then

Similar Threads

  1. [Help]Removing item from listbox [solved]
    By pushdis15 in forum Visual Basic Programming
    Replies: 9
    Last Post: 04-14-2011, 08:47 PM
  2. [Help] WMP selecting song from ListBox [solved]
    By alvaritos in forum Visual Basic Programming
    Replies: 10
    Last Post: 04-13-2011, 03:23 PM
  3. [Help]Removing items from ListViewEx? [Solved]
    By Invidus in forum Visual Basic Programming
    Replies: 5
    Last Post: 09-24-2010, 02:57 PM
  4. [Help]Reading filenames to a listbox[Solved]
    By nathanael890 in forum Visual Basic Programming
    Replies: 4
    Last Post: 08-14-2010, 11:44 AM
  5. HELP~extracting files from differnet
    By heydiddledagain in forum Combat Arms Help
    Replies: 0
    Last Post: 03-07-2010, 09:47 AM