VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

NormDialog

Norm Cook  (11 Submissions)   Custom Controls/Forms/Menus   Visual Basic 3.0   Advanced   Wed 3rd February 2021

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.

Rate NormDialog (2(2 Vote))
NormDialog.bas

NormDialog Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters