Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

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 Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date