| 
| 
| 
| #199288 - 2010-08-04 04:09 PM  Re: UserAccounts.CommonDialog vs BrowseForFile and BrowseForFolder
[Re:  Mart] |  
| Arend_   MM club member
 
       
   Registered:  2005-01-17
 Posts: 1896
 Loc:  Hilversum, The Netherlands
 | 
If you have MSCOMDLG32.OCX, and registered it you can use the following code:
 
Function BrowseForFile($strPath, $strFilter)
  Dim $objDialog, $intResult
  $objDialog = CreateObject("MSComDlg.CommonDialog")
  $objDialog.Filter = $strFilter
  $objDialog.InitDir = $strPath
  $objDialog.MaxFileSize = 256
  $objDialog.Flags = &80000+&4+&8
  $intResult = $objDialog.ShowOpen()
  $BrowseForFile = $objDialog.FileName
EndFunction
$FileName = BrowseForFile("c:","*.kix")
 |  
| Top |  |  |  |  
| 
| 
| #199324 - 2010-08-05 11:29 AM  Re: UserAccounts.CommonDialog vs BrowseForFile and BrowseForFolder
[Re:  Mart] |  
| BradV   Seasoned Scripter
 
      
 Registered:  2006-08-16
 Posts: 687
 Loc:  Maryland, USA
 | 
Well, browseforfolder can search for a file if you put in hex 4000.  I just couldn't figure out how to get the data out of the object.  I was searching all over.    |  
| Top |  |  |  |  
 Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
 
 | 
| 
 
| 0 registered
and 739 anonymous users online. 
 | 
 |  |