You are currently viewing the BOOK: Stephens' Visual Basic Programming 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I added a few things to this TryIt and now it will be quite useful to me. I had it verify that the directory exists and had it list the subdirectory info (from the starting directory). Now I can quickly search thru my project files to find where I previously used a command that I might have forgotten a detail or two (or three). Thanks.
Good idea! I have a version of that program that use occasionally, too. Vista and Windows 7 won't search the contents of files unless they know the file type so it's hard to search files like source code files without a tool of your own. Now you know how to build one
Yes, it works well but it doesn't find anything in .pdf files. When it didn't find anything I wasn't sure if it was still running or not so I put in a messagebox at the end to let me know when it is finished.
Yes, PDF is a binary format so the text it contains is all messed up. Try opening one with WordPad to see what's in there. To search a PDF (or other binary file), you would need a library that could open the file as a PDF and figure out what text it contains.
Another approach to knowing when the program's done is to provide a status label that shows what file it is searching. Or perhaps it shows every tenth file so it doesn't slow itself down listing files. When it's done, it can set the status label to "Done."
A status label !!! I like that idea. Something new to play with. BTW, I received your book VB 2010 Programmer's Reference today. It sure is a big book.