Solved

Run find files and folders from VB

Posted on 1998-12-23
7
274 Views
Last Modified: 2012-06-22
Can I run the find files and folders (like from the start button) from VB? Without using sendkeys please.
If it is an exe. file I can't seem to find it.
0
Comment
Question by:jbil
7 Comments
 
LVL 13

Expert Comment

by:Mirkwood
Comment Utility
Would you believe me if I tell you that it is impossible to do it without sendkeys?
0
 
LVL 3

Author Comment

by:jbil
Comment Utility
I believe all things are possible, except maybe "run the find files and folders (like from the start button) from VB" <G>

0
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
And the problem with "sendkeys" is what?

M

0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 12

Expert Comment

by:mark2150
Comment Utility
Would you prefer a version that does a SHELL to DOS and runs a DIR command?

M

0
 
LVL 1

Accepted Solution

by:
bear454 earned 20 total points
Comment Utility
Here's the classID for ShellFind :
{61E218E0-65D3-101B-9F08-061CEAC3D50D}
The in process server is shell32.dll

Saved Searches (.fnd files) use DDE to call Explorer.exe
The DDE message is: [OpenFindFile("%1", %I)]
The Application is: Folders
The Topic is: AppProperties
0
 
LVL 1

Expert Comment

by:blwatkins
Comment Utility
I have a Find files control I'm working on.  It works just like the windows find files, but gives you the control of all its functions, and allows you to call it within your program.

If you are interested email me.

Blwatkins@achievesolutions.com

0
 
LVL 3

Author Comment

by:jbil
Comment Utility
Thanks bear454

I also figured out how to use Explorer and a few API calls to do it.

This is the code so far.........


Private Sub cmdFind_Click()
Dim lMyHandle As Long
lMyHandle = FindWindow(vbNullString, "Exploring -  (C:)")
SetActiveWindow lMyHandle
sendstrings lMyHandle
End Sub

Sub sendstrings(ByVal lrecwin As Long)
SetForegroundWindow lrecwin
SetFocusAPI lrecwin
'Sleep 5
Call PostMessage(lrecwin, WM_KEYDOWN, VK_F3, 0&)
End Sub

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now