VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

EBrowseF.zip

Stephen Fonnesbeck  (1 Submission)   Windows API Call/Explanation   Visual Basic 3.0   Advanced   Wed 3rd February 2021

Enhancing the SHBrowseForFolder API Function

============================================

Browse for a Folder using SHBrowseForFolder API function with a callback function BrowseCallbackProc. This Extends the functionality that was given in the MSDN Knowledge Base article Q179497 "HOWTO: Select a Directory Without the Common Dialog Control".
After reading the MSDN knowledge base article Q179378 "HOWTO: Browse for Folders from the Current Directory", I was able to figure out how to add a callback function that sets the starting directory and displays the currently selected path in the "Browse For Folder" dialog.

Inputs
Public Function BrowseForFolder(owner As Form, Title As String, StartDir As String) As String owner = referance to the calling from (can be 0) Title = Intructions to appear in the "Browse for Folder" dialog. StartDir = The directory that is displayed in the tree view when the dialog appears.

Assumes
How to call API functions and how to use the AddressOf operator to get a function pointer and store it in a variable.

Returns
If user doesn't click cancel then it returns a string with the directory the users selected.

Rate EBrowseF.zip (12(12 Vote))

Download EBrowseF.zip

EBrowseF.zip Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters