VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



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

by Bill Bither (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (15 Votes)

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..)
Code Returns
selected Filename and/or filenames
API Declarations
GetOpenFileName
GetSaveFileName

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

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

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

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

No comments have been posted about File Dialog Class (replace common dialog control with this lightweight class). Why not be the first to post a comment about File Dialog Class (replace common dialog control with this lightweight class).

Post your comment

Subject:
Message:
0/1000 characters