Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Searching


  • Please log in to reply
4 replies to this topic

#1 heltune

heltune

  • Members
  • 59 posts
  • OFFLINE
  •  
  • Local time:05:25 PM

Posted 10 September 2008 - 12:28 PM

help me... what is the code for VB6.0 on how to find any file on a specific folder when i hit a command button... heres the case i already got on how to search .doc files on my search emulation project but what i want that it will not only search for .doc (word documents) but also other file extension such as .xls or .ppt or any files found on my hard drive... please help me...

bdw im using a textbox where users can search that is u can put any strings on the textbox and when the user hits the command button to search the results will be reflected on the listbox (where i was able to do also)... all the searches nearest to the strings that i have put in the textbox will be listed... please help me code it... thank you and god bless

BC AdBot (Login to Remove)

 


#2 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:09:25 PM

Posted 11 September 2008 - 05:32 AM

Sorry i cant help but a very tough question Groovicus might find this a slight challange lol, but i doubt it...i wish he would help me with my if statements :|

#3 Keithuk

Keithuk

  • Members
  • 957 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:25 PM

Posted 11 September 2008 - 07:13 AM

help me... what is the code for VB6.0 on how to find any file on a specific folder when i hit a command button... heres the case i already got on how to search .doc files on my search emulation project but what i want that it will not only search for .doc (word documents) but also other file extension such as .xls or .ppt or any files found on my hard drive... please help me...

bdw im using a textbox where users can search that is u can put any strings on the textbox and when the user hits the command button to search the results will be reflected on the listbox (where i was able to do also)... all the searches nearest to the strings that i have put in the textbox will be listed... please help me code it... thank you and god bless

Hi again heltune.

I would say your best bet for this type of function is to use a DriveListBox, DirListBox and a FileListBox with the Pattern set on the FileListBox to File1.Pattern = "*.doc;*.xls;*.ppt" and that will only show those files in specific folders. :thumbsup:

Edited by Keithuk, 11 September 2008 - 07:14 AM.

Keith

Windows ME (spare computer)
Windows XP 2002 Professional SP3 (desktop computer)
Windows 7 Professional SP1 32bit (laptop computer)

Windows 8 64bit spare drive for laptop computer


#4 heltune

heltune
  • Topic Starter

  • Members
  • 59 posts
  • OFFLINE
  •  
  • Local time:05:25 PM

Posted 11 September 2008 - 09:02 AM

i already tried that and was able to do (DriveListBox, DirListBox and a FileListBox with the Pattern set on the FileListBox to File1.Pattern = "*.doc;*.xls;*.ppt") it... anyway sorry for being pushy on this problem...

actually the reason why im using a listbox instead of a filelistbox is that i have a search button (command button) where i a user can put into the textbox strings related to a file (it may be a .doc, .xls or .ppt or any file) somehow i was able to do the search code emulation on the project where a user can put any string on the textbox to search for its nearest/at least/ filename with respect to the string on the textbox... on a selected directory or even subdirectory (i am still having a problem on the behaviour of the search emulation thought hehehhe lol).... filelistbox behave differently on listbox...
so to sum it up.... i hope someone can help me with this hahhahaha .... thank you po!!!

(bdw i was able to code only on patterns with .doc files that is word documents, i mean i can only search .doc extension or word documents... how am i going to code for other file extentions such as .xls or .ppt or even .txt ... ... i want my search command button to search for these file extenstions... thank you...)

#5 Keithuk

Keithuk

  • Members
  • 957 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:10:25 PM

Posted 12 September 2008 - 06:11 AM

(bdw i was able to code only on patterns with .doc files that is word documents, i mean i can only search .doc extension or word documents... how am i going to code for other file extentions such as .xls or .ppt or even .txt ... ... i want my search command button to search for these file extenstions... thank you...)


Well you have a ComboBox with all the extensions you want to search for. :thumbsup:

Keith

Windows ME (spare computer)
Windows XP 2002 Professional SP3 (desktop computer)
Windows 7 Professional SP1 32bit (laptop computer)

Windows 8 64bit spare drive for laptop computer





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users