哈!我好象帮你找到了<br>unit FindDialogs;<br><br>{**********************************************************}<br>{ }<br>{ TFindFilesDialog & TFindComputerDialog Unit }<br>{ Copyright ?999 Workshell Software. }<br>{ }<br>{ Version 1.0 }<br>{ }<br>{ }<br>{ Web -> http://www.workshell.uni.cc/ }<br>{ E - Mail -> finddlgs@kinsella.u-net.com }<br>{ }<br>{**********************************************************}<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> ShlObj;<br><br>type<br> TFindFilesDialog = class(TComponent)<br> private<br> { Private declarations }<br> protected<br> { Protected declarations }<br> public<br> { Public declarations }<br> function Execute: Boolean;<br> function ExecuteEx(pidlRoot, pidlSavedSearch: PItemIDList): Boolean;<br> published<br> { Published declarations }<br> end;<br><br>type<br> TFindComputerDialog = class(TComponent)<br> private<br> { Private declarations }<br> protected<br> { Protected declarations }<br> public<br> { Public declarations }<br> function Execute: Boolean;<br> function ExecuteEx(pidlRoot, pidlSavedSearch: PItemIDList): Boolean;<br> published<br> { Published declarations }<br> end;<br><br>procedure Register;<br><br>implementation<br><br>function SHFindFiles(pidlRoot: PItemIDList; pidlSavedSearch: PItemIDList): Boolean;<br> stdcall; external 'Shell32.dll' index 90;<br><br>function SHFindComputer(pidlRoot: PItemIDList; pidlSavedSearch: PItemIDList): Boolean;<br> stdcall; external 'Shell32.dll' index 91;<br><br>function TFindFilesDialog.Execute: Boolean;<br>begin<br>Result := SHFindFiles(nil,nil);<br>end;<br><br>function TFindFilesDialog.ExecuteEx(pidlRoot, pidlSavedSearch: PItemIDList): Boolean;<br>begin<br>Result := SHFindFiles(pidlRoot,pidlSavedSearch);<br>end;<br><br>function TFindComputerDialog.Execute: Boolean;<br>begin<br>Result := SHFindComputer(nil,nil);<br>end;<br><br>function TFindComputerDialog.ExecuteEx(pidlRoot, pidlSavedSearch: PItemIDList): Boolean;<br>begin<br>Result := SHFindComputer(pidlRoot,pidlSavedSearch);<br>end;<br><br>procedure Register;<br>begin<br> RegisterComponents('Dialogs', [TFindFilesDialog,TFindComputerDialog]);<br>end;<br><br>end.<br>