Page 1 of 1

Search function

Posted: Wed Jan 18, 2012 3:11 pm
by clanc789
Hey Coders,

I got a question on how to make this:
How can I make a program with a textbox in which you enter the name of a file and it searches for it on your hdddisk. So if i type "notepad" (without the "" ofc) it will search for the good old fashioned notepad. The results should be displayed in a listview.

Ill award the one who helped me out with a +rep & 10 credits. Thank you!

Re: Search function

Posted: Wed Jan 18, 2012 4:16 pm
by Filip

Re: Search function

Posted: Wed Jan 18, 2012 5:06 pm
by clanc789
Dont work (both) i searched on google and YT but cant find anything. Please someone?

Re: Search function

Posted: Wed Jan 18, 2012 5:17 pm
by MrAksel
Wait ca 30 min?

Re: Search function

Posted: Wed Jan 18, 2012 5:19 pm
by clanc789
LOL Wait 30 mins for? Your help? Ofc I will :D (gtg eating anyhow!).

Thx in advance already!

Re: Search function

Posted: Wed Jan 18, 2012 7:32 pm
by MrAksel
Soory im late, think this works

Re: Search function

Posted: Wed Jan 18, 2012 8:42 pm
by clanc789
Works, but how do i display the results in a listbox? I need that too :D

Re: Search function

Posted: Thu Jan 19, 2012 7:27 pm
by MrAksel
You know where it has that MsgBox thing? You can change
Code: Select all
Invoke(Sub() MsgBox("Match at '" + f + "'."))
in Form1.vb to
Code: Select all
Invoke(Sub() ListBox1.Items.Add(f))

Re: Search function

Posted: Fri Jan 20, 2012 8:04 am
by clanc789
Thanks so much MrAksel!!! (send you +rep & 9 creds now, you alrdy got one for the app download).