Re: Utility - File Search
Looks awesome. Tried to run a simple search and got the following error:
"cmdBeginSearch_Click Error: Cross-thread operation not valid: Control 'stbSearchInfo' accessed from a thread other than the thread it was created on."
I ran it in 2008 Express. Should that make any difference?
Thanks!
Bryce
Re: Utility - File Search
I'm not quite sure why you are getting that error. There could be an issue that the 3.5 framework imposes more security than the 1.1. I'll have to take a look at this, when I get a chance. The example I provided above is pretty old and actually I forgot it was even here, so I'll update it soon.
Re: Utility - File Search
Appreciate it, man. Thanks!
Like your website, btw!
1 Attachment(s)
Re: Utility - File Search
I have made some changes to this code and in fact the application overall.
The main layout is still the same however most of the code has been replaced.
Main Updates:
- Has been built against the 3.5 framework in VS 2008
- The Excel Export feature no longer uses late binding.
- Allowed multi threading of search and form
Re: Utility - File Search
Excellent, thanks!
I'll check it out!
Re: Utility - File Search
Beal,
I had to add a COM reference to "Microsoft Excel 10.0 Object Library." After doing so, it worked great!
It is much faster than the search apps I've been toying with, so thanks!
Mind if I steal shamelessly from your code?!
Bryce
Re: Utility - File Search
If I minded...I wouldn't have posted it :D
Re: Utility - File Search
Beal
Man, 1394 views of original code and you only have 65+ rep points?
That blows !
Here is at least 1 more :thumb:
Nice work.
Spoo
Re: Utility - File Search
Hey ProphetBeal thanks for the Software, works great :thumb:
I've managed to blend it in with a program i wrote and have stumbled across a few questions you might be able to help me with.
1) can i change the search criteria so that it only searches through files that have extension *.lst. I've done this for my program but i have no idea where to start editing your code, i'm self taught :blush:
2) Can i modify the "Right click" menu of each item found. i.e. i want to disable export to excel and maybe add a custom feature.
3) Can i modify the "double click" routine so that it copies the file name to another textbox on my program. ie: if i find file....C:\MyFolder\TF12345.lst i want to store "12345" in a text box on my form for later use.
4) For some reason the status bar at the bottom wont display the current status. All i did was copy it directly from your form to mine and made sure i have all relevent code in the background. It looks as though the "tooltips" and "statustext" are being changed properly but not displaying. Any ideas how or why this could happen?
5) How would you like me to Credit all your great efforts in providing this code for us not so clever to use:afrog: Have u got a sig or pic or anything? So far i've added your name to the "aboutbox" in my program.
Well i know thats a lot of questions so i dont expect u to answer them all at once or even answer all of them, so having said any help is much, much appreciated.
Thanks
John:wave:
Re: Utility - File Search
Quote:
Originally Posted by
ja2984
1) can i change the search criteria so that it only searches through files that have extension *.lst. I've done this for my program but i have no idea where to start editing your code, i'm self taught :blush:
In my app there is a text box for just that purpose. The control name is "txtFileName" and it's labeled on the form as "All or part of the file name:"
Quote:
Originally Posted by
ja2984
2) Can i modify the "Right click" menu of each item found. i.e. i want to disable export to excel and maybe add a custom feature.
You need to edit the "cmnOpenResults" context menu control
Quote:
Originally Posted by
ja2984
3) Can i modify the "double click" routine so that it copies the file name to another textbox on my program. ie: if i find file....C:\MyFolder\TF12345.lst i want to store "12345" in a text box on my form for later use.
Sure, that would be done in the "lsvFilesFound_DoubleClick" Sub
Quote:
Originally Posted by
ja2984
4) For some reason the status bar at the bottom wont display the current status. All i did was copy it directly from your form to mine and made sure i have all relevent code in the background. It looks as though the "tooltips" and "statustext" are being changed properly but not displaying. Any ideas how or why this could happen?
I can't really say why this isn't working. If your app isn't multi-threaded correctly that could have something to do with it (IE the screen isn't getting refreshed because the thread is busy).
If you want more with this issue I suggest creating a thread in the VB.NET forums and post some of your code there.
Quote:
Originally Posted by
ja2984
5) How would you like me to Credit all your great efforts in providing this code for us not so clever to use:afrog: Have u got a sig or pic or anything? So far i've added your name to the "aboutbox" in my program.
A note at the top of your code with my name and a link to this thread would be more than enough.
I hope these answers helped. :thumb:
Re: Utility - File Search
Thanks ProphetBeal, i'll have a look into the answers and see if i cant nut out what i need.
I'll do dome more research on why my status bar is not working, basically what u said about the thread being busy went over my head (giraffes fart) hehe.
I'll add your details and link to my code and about form.
Thanks once again,
John.
Re: Utility - File Search
Hello ProphetBeal, your software is great !
I've seen some problems when using this latter :
- In the first textbox ("A word or phrase within the file") : the software finds some fakes results (the word that I choose isn't in the PDF Files).
- In the second textbox ("All or part of the file name") : so as to find a file, I have to put an * just before and after my search.
How to resolve these problems ?
Thank you so much.
Julien.
Re: Utility - File Search
Quote:
Originally Posted by
AsyLuM
- In the first textbox ("A word or phrase within the file") : the software finds some fakes results (the word that I choose isn't in the PDF Files).
It scans the binary versions of the files, so I will bet if you use Notepad to open the PDF in question and search for that text it will find it. I'm not really sure how to avoid this. Any suggestions are welcome.
Quote:
Originally Posted by
AsyLuM
- In the second textbox ("All or part of the file name") : so as to find a file, I have to put an * just before and after my search.
Not sure what the issue here is. Are you saying you don't like using "*"? The built in windows searches use a similar methodology "*.pdf" will only search PDF files.
Re: Utility - File Search
Using "*" is not a problem.
Indeed, when I try to open PDF files with notepad, it shows me some misunderstanding thing like this,"OaóÕ¶jë…õy±¬Èénr*". And , by chance, there is the letters association I'm looking for but not really the word.
I'm sorry but I can't help you to improve your software.
Re: Utility - File Search
Hi ProphetBeal,
according to the PDF file problems, I've find the code of stanav ! ( add reference : itextsharp.dll (the 4.0.1 works better than the last with my VS2008) and SharpZipLib.dll)
This latter finds the text in the PDF and puts it in a string value.
Can you tell me how to adapt it to your code ?
Thank you.
PS : Sorry for my bad english.
Julien.
Re: Utility - File Search
HI!
How can i modify the code to search files by it's extension when the folder options are set to hide the file extension??
thanks.