VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

File Dialog Class (replace common dialog control with this lightweight class)

Bill Bither  (1 Submission)   Files/File Controls/Input/Output   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

Replaces Microsoft's common dialog control file dialog features. Uses same interface to call the FileOpen and FileSave dialogs including multiselection support.
Instead of making a more versatile control with print dialogs, color dialogs, and hooking, I decided to make a very lightweight one since the CommonControl Print and Color Dialogs are
essentially useless.
I could have added hooking functionality, but that would involve including a standard module
as well. The only major benefit of hooking is the ability to center the dialog. However,
with this code, as long as you specify the form's handle, it will position the dialog to the
upper left of the form
This is a direct replacement to the Microsoft CommonDialog control and will involve very little
Change in coding to implement.

Inputs
File Dialog Options (FileName, Filters, Default Extension, etc..)

Returns
selected Filename and/or filenames

API Declarations
GetOpenFileName
GetSaveFileName

Rate File Dialog Class (replace common dialog control with this lightweight class) (15(15 Vote))

Download File Dialog Class (replace common dialog control with this lightweight class)

File Dialog Class (replace common dialog control with this lightweight class) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters