by Norm Cook (11 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating:
(2 Votes)
I got irked at the way the standard CommonDialog control responds to multiple file selection so I wrote my own. This one mimics the standard CDialog but has some extra features. Properties:
Cancelled = true after showopen if user cancels
DialogCaption = Caption of the dialog
DialogX & DialogY = position of dialog
DirectoriesOnly = browse for directories
FileCount = Number of files returned after Showopen
FileNameArray = Array of filenames returned
Filter = filter as used in normal common dialog
e.g. "All Files|*.*|Text Files|*.txt|Executables|*.exe"
FilterIndex = Which of the above to start with
e.g. 0 would refer to All Files, 1 to Text Files, etc
InitDir = specifies initial directory to start, must exist
ShowOpen (method) call the dialog
You can customize this anyway you see fit. One thought would be to skin the Dialog form or add properties for fonts, fore & back colors, etc.
I included a test project but you must first compile the ocx to use it. The ocx is in the zip but VBC may remove it.
Enjoy.
Upload