the common dialog box (open/save mode) 
Author Message
 the common dialog box (open/save mode)

1) is there any way of getting the common dialog to return a directory
(not just a file name)?

2) If the above is possible as an extension can it return a mixture of
both directories and files (using multi-select)?

if one or both of the above are not possible is there another simple
way of achieving the same results?

any help would be much appreciated! and thanks in advance

Sent via Deja.com
http://www.*-*-*.com/



Sat, 19 Jul 2003 01:16:38 GMT  
 the common dialog box (open/save mode)
Use the DirList, DriveList and FileList to make your own file open window.
It's very easy and you can make it look how you want.

Stuart



Sat, 19 Jul 2003 03:29:12 GMT  
 the common dialog box (open/save mode)
  SitePath = fncOpenFile("Text(*.TXT)|*.TXT")

Public Function fncOpenFile(ByVal FileType As String) As Variant
On Error GoTo ErrorHandle

  ' Set CancelError is True
  CommonDialog1.CancelError = True  ' Set flags

  CommonDialog1.FLAGS = cdlOFNHideReadOnly

  ' Set filters
  CommonDialog1.Filter = FileType

  ' Specify default filter
  CommonDialog1.FilterIndex = 2

  ' Display the Open dialog box
  CommonDialog1.ShowOpen

  ' Display name of selected file
  fncOpenFile = CommonDialog1.FileName

errorHandle:
'Do your errorhandle
End Function


Quote:
> 1) is there any way of getting the common dialog to return a directory
> (not just a file name)?

> 2) If the above is possible as an extension can it return a mixture of
> both directories and files (using multi-select)?

> if one or both of the above are not possible is there another simple
> way of achieving the same results?

> any help would be much appreciated! and thanks in advance

> Sent via Deja.com
> http://www.deja.com/



Sat, 19 Jul 2003 08:37:49 GMT  
 the common dialog box (open/save mode)


Wed, 18 Jun 1902 08:00:00 GMT  
 the common dialog box (open/save mode)
Has anyone found a problem with the DirList control

VB5 SP3 - I get a GPF if I double click a higher directory - this
appears to be due to it trying it access a negative index.

I've found a work around - disabling the thing on the first click -
even so I am curious to know whether this is something to do with the
setup on (both) my machines - or a known bug.



Sat, 19 Jul 2003 22:04:14 GMT  
 the common dialog box (open/save mode)


Wed, 18 Jun 1902 08:00:00 GMT  
 the common dialog box (open/save mode)


Quote:
> 1) is there any way of getting the common dialog to return a directory
> (not just a file name)?

No.

Quote:
> 2) If the above is possible as an extension can it return a mixture of
> both directories and files (using multi-select)?

No.

Quote:
> if one or both of the above are not possible is there another simple
> way of achieving the same results?

Depends on what you consider simple.  To get a directory (not a file),
you can use the SHBrowseForFolder API or third-party control.  To get a
list of multiple files, you can use the common dialog control.  If you
want to get both from the same dialog, you will probably have to create
your own.  BTW, I don't recommend using the Directory list control
because it isn't very modern or network friendly.  Try a third-party
folder tree view control such as the one from CCRP.

- Jim

Sent via Deja.com
http://www.deja.com/



Sun, 20 Jul 2003 01:12:10 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Centering a Open Dialog box using the Common dialog

2. Newbie-Common Dialog Box in ShowColor mode

3. alter default common dialog open /save

4. Help, disabling options, common dialog open and save

5. Common Dialog Save/Open

6. SIMPLE HELP NEEDED - Saving a text file using a common dialog box

7. Common Dialog Box - Save

8. Common Dialog Box Saving ?

9. Save common dialog box

10. Common Dialog box - saving settings?

11. Common Dialog Boxes (Save)

12. Open File Common Dialog Boxes in Access95 VBA Code

 

 
Powered by phpBB® Forum Software