How To Use a Common Dialog File Open Dialog with Win32 API (161286)
The information in this article applies to:
- 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
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q161286 SUMMARY
This article provides a code sample and demonstrates how to use the File
Open dialog box in the Comdlg32.dll. Making use of Comdlg32.OCX is a good
reuse of resources under Windows, because Windows always has its dependent
file, Comdlg32.dll, loaded. It provides an easy-to-use interface, but can
be a performance hit. If you use the OCX control, you have to load the
module into memory and also distribute a 90K OCX control to users of your
software. To improve performance, you should minimize the use of controls
in your applications. Instead, you can use the Win32 API calls directly.
If you use the API calls, you may lose some of the functionality that
Comdlg32.OCX offers, such as the Help button. If you require the Help
button, you will need to use the Comdlg32.OCX control.
REFERENCES
The Win32 SDK documents other calls to the Comdlg32.dll such as
ChooseColor, ChooseFont, and GetSaveFileName.
For more information, please see the following articles in the Microsoft
Knowledge Base:
106682
: Default Extension Ignores File Type in VB Common Dialog
137194
: GetOpenFileName nMaxFile Interpreted Incorrectly
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbhowto KB161286 |
---|
|