devxlogo

Creating Win95 Explorer-like Dialogs

Creating Win95 Explorer-like Dialogs

Question:
Are there common dialogs in Win95 like file open/save? I wish to put in my apps the ability to use long filenames which Win95 supports.

Answer:
Here is the code to give you a Win95 open dialog. The Flags property is the critical one…you have to include two particular flags to get the dialog to be the Windows 95 one. The nice thing about VB4 is that you can open any filename with the Open command, including long filenames. For more information on the Common Dialog, see the VB4 help file.

   CommonDialog.Flags = cdlOFNLongNames + cdlOFNExplorer   CommonDialog.DialogTitle = “Select Output File”   CommonDialog.Filter = “All Files(*.*)|*.*|HTML Files (*.htm;*.html)|*.htm;*.html”   CommonDialog.FilterIndex = 2   CommonDialog.CancelError = True   CommonDialog.ShowOpen

devx-admin

Share the Post: