How To Use the Common Dialog Control with Multiple Long File Names (198974)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q198974 SUMMARY
The following article provides an example of retrieving more than one file using the Common Dialog control.
There are several Flag properties that can be set for the ShowOpen method of the Common Dialog control to enable the selection of multiple files and long file names. For example, cdlOFNAllowMultiselect + cdlOFNExplorer provides for the selection of multiple files and an Explorer-like dialog window. Selecting these two flags also enables long file names (LFN) and causes the Common Dialog control to use different delimiters in the string that it fills with file and directory information. The programming approach demonstrated in this article is required when both long file names and multiple files are enabled as a result of flag selection.
Microsoft Visual Basic Books Online indicates that when these two flags are used, it is necessary to code differently when using Microsoft Windows 95 and Microsoft Windows NT. This is incorrect. The same code works in both environments.
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbCmnDlg kbCmnDlgFileO kbCtrl kbhowto KB198974 |
---|
|