Win32 Shell Routines
Methods dealing with callbacks, enumeration and subclassing are for VB5/VB6 only.
Updated Monday December 26, 2011
   
Category
Topic
Browse Dialog
vb6
vb5
vb4-32
DoAddToFavDlg: Add and Manipulate IE Favourite Links
Display the Add To Favourites and Organize Favourites dialogs in your application, and create Internet Favourite entries in the Favourites folder or subfolder specified by the user. Nov 1.1999

DoAddToFavDlg: Create and Manipulate IE Favourites in Specified Folders
Display the Add To Favourites and Organize Favourites dialogs in your application, and create Internet Favourite entries in any system folder obtainable as a PIDL. In addition, open the Organize dialog in any PIDL-based folder, and perform the dialog's create, rename, move or delete operations on any file or folder present. Nov 1.1999

SHBrowseForFolder: Browse for Folders Overview
Details on the ITEMIDLIST, SHITEMID, BROWSEINFO structures, and the SHGetSpecialFolderLocation, SHGetPathFromIDList and SHBrowseForFolder APIs.

SHBrowseForFolder: Browse for Folders Dialog
Code to implement the Browse Folders Dialog in Win32/NT4. See the page above for commented descriptions of the function.

SHBrowseForFolder: Browse for Folders New UI Features
Take advantage of some new IE4 and IE5 shell enhancements to the Browse dialog. May 30.1999

SHBrowseForFolder: Browse for Folders Callback Overview
A discussion of the terms and requirements for providing the interface to a Browse for Folders callback routine. vb5/vb6 only

SHBrowseForFolder: Pre-selecting Folders using a Browse Callback
Add a callback routine to your VB5/6 code to allow pre-selecting of a file system object when displaying the Browse Folders Dialog. Added version-detecting code and necessary changes to allow the String method to function on NT. vb5/vb6 only May 30.1999

SHBrowseForFolder: Browse to Obtain Network Machines or Shares
How to return a share or remote computer using the familiar Browse dialog. Nov 30.1999



CSIDL / PIDL
vb6
vb5
vb4-32
SHGetFolderPath: Overview of Shell and ComCtrl Versions, CSIDL Values
Description of the constants used in SHGetFolderLocation, SHGetFolderPath, SHGetSpecialFolderLocation, and SHGetSpecialFolderPath, to retrieve a special folder's pathname or item ID list (PIDL) Aug 08.1999

SHGetFolderPath: Retrieve Windows Shell Folders (Best Practice)
Using the new MS 'Best Practice' of SHGetFolderPath to retrieve a special folder's pathname Aug 8.1999

SHGetSpecialFolderLocation: Retrieve Windows Shell Folders
An alternate method to the SHGetFolderPath Best Practice for retrieving system folder locations.  Nov 24.1999



Disk Routines
vb6
vb5
vb4-32
GetDiskFreeSpace: Free Disk Space on Windows 95 (or Small Partitions)
The code to determine clusters, sectors, used and free space on a release version of Win95 (pre-OSR/2).

GetDiskFreeSpaceEx: Free Disk Space on a Fat32 or NTFS Drive
The code to determine total, used and free space on a Fat32 drive made with Windows 95 OSR2 or Windows 98.

SHFileOperation: Copy or Move an Entire Directory
Using the SHFileOperation API, you can easily move or copy entire directories, including all subdirectories.

GetVolumeInformation: Get Disk Volume Label & Serial Number
Call a single API to retrieve this info.

GetDriveType: Enumerate and Identify Available System Drives
API method to determine a system's installed drives and their type.

GetLogicalDriveStrings: Determine if a Specific Drive Exists
API method to determine if the system has a specific drive letter.

GetDriveType: Identify a System's CD-ROM Drive
Code to determine if the target system has a CD-ROM installed, obtain its drive letter, and the volume name of an inserted CD.

SHChangeNotifyRegister: Receive Shell Change Notifications
Track additions, deletions and changes to the physical and virtual file system. (VB5/6 only) Sep 13.1998

GetDiskFreeSpaceEx: Detailed Drive Info
Retrieve drive and volume information for any size partition or drive on any 32-bit platform. Jul 29.1999

GetDiskFreeSpaceEx: Determining Free Disk Space
Four wrappers for retrieving disk free and used space info on any 32-bit Windows system. Dec 23.1999



File System
vb6
vb5
vb4-32
FindFirstFile: Enumerate Folders to a TreeView
API routine recursively load a TreeView control with the folders on a selected drive.

FindFirstFile: Enumerate Folders to a TreeView, Advanced
Building on the code from the above page, this method provides for the optional loading of folders for either a single-level or an entire drive, and adds visual identification to the drives and folders with image list icons.

SHChangeNotifyRegister: Receive Shell Change Notifications
Track additions, deletions and changes to the physical and virtual file system. Sep 13.1998

RegEnumKeyEx: Retrieve the Registered File Associations
Use RegEnumKeyEx and SHGetFileInfo to list all the registered file extensions on the system. Mar 18, 2001



LNK Files (Shortcuts)
vb6
vb5
vb4-32
DoAddToFavDlg: Add and Manipulate IE Favourite Links
Display the Add To Favourites and Organize Favourites dialogs in your application, and create Internet Favourite entries in the Favourites folder or subfolder specified by the user. Nov 1.1999

DoAddToFavDlg: Create and Manipulate IE Favourites in Specified Folders
Display the Add To Favourites and Organize Favourites dialogs in your application, and create Internet Favourite entries in any system folder obtainable as a PIDL. In addition, open the Organize dialog in any PIDL-based folder, and perform the dialog's create, rename, move or delete operations on any file or folder present. Nov 1.1999

SHAddToRecentDocs: Add Entries to Recent Documents List
No VB app is ready for prime time until it can master this standard Windows functionality.

SHGetSpecialFolderLocation: Create a Desktop Shortcut
Cheat a little and use the Windows API to add an application shortcut to the user's desktop. May 19.1999

SHAddToRecentDocs: Create an App Shortcut (Workaround - Pre-XP)
A workaround (for now) to overcome VB's inability to create shortcuts at will. Provides a method of creating shortcuts for anything (not just applications), and placing them anywhere on the user's system.

SHGetSpecialFolderLocation: Create an IE Shortcut (.url)
Create an Internet Explorer shortcut in the user's Favourites folder, or on the desktop.



Property Sheets
vb6
vb5
vb4-32
ShellExecuteEx: Displaying a File's Property Page
Code to invoke the property page information for any file on the system. This is identical to the properties displayed by right-clicking a file in Explorer.

ShellExecuteEx: Drive, Folder & File Property Pages
Demo app to populate two lists with the folders and files of specified directories, navigate the drives, and invoke the property page of any drive, folder or file. The routine uses APIs to populate the lists. Functionality is similar to that using the VB DirList, DriveList and FileList controls.



Shell
Operations /
ShellExecute
vb6
vb5
vb4-32
ShellExecute: Simulate a Hyperlink with a Label Control
Simple code using the API to create a hyperlink and react to mouse movement. Feb 18.2000

keybd_event: Find All Files Dialog
Two of three methods to show the Find Files dialogs. Oct 6.1999

SHChangeNotifyRegister: Receive Shell Change Notifications
Track additions, deletions and changes to the physical and virtual file system. Sep 13.1998

ShellExecute: ShellExecute Madness 
Making the most out of Windows' file associations. Oct 26.1998

ShellExecute: Send Large Emails in Outlook Express 
When the command string will exceed 240 characters, use this ShellExecute alternative. Mar 10.2002



SHFileOperation
vb6
vb5
vb4-32
SHFileOperation: Add Recycle Bin Functionality
Using the SHFileOperation API, add the capability of regular file deletion or Recycle Bin storage to your applications easily.

SHFileOperation: Copy, Move or Delete Files
Build on the SHFileOperation Recycle Bin routine to include multiple file deletions, file moving and file copying, all with the same routine.

SHQueryRecycleBin: Recycle Bin Management
API methods to display, count and empty the recycle bin in code.  Jan 13.1998



System Tray
vb6
vb5
Shell_NotifyIcon: Add Icon to Windows System Tray
Add and respond to an icon placed in the System Tray. Updated Jun 6.1999

Shell_NotifyIcon: Respond to Systray Icon/Menu Interaction
Add and respond to an icon placed in the System Tray. Demos using the systray to display drive statistics via GetDiskFreeSpaceEx. Updated Jun 6.1999

Shell_NotifyIcon: Respond to Systray Icon/Menu Interaction in a MDI App
Add and respond to an icon placed in the System Tray in a MDI application. Demos using the systray to display drive statistics via GetDriveSpaceFreeEx in MDI Child Windows.  Jul 31.1999



Undocumented
Shell32
Functions
vb6
vb5
vb4-32
SHChangeNotifyRegister: Receive Shell Change Notifications
Track additions, deletions and changes to the physical and virtual file system. (VB5/6 only) Sep 13.1998

Undocumented Windows: Overview
The basics on the undocumented Shell32 API functions we've prepared for VBnet.

Undocumented Windows: Shell Dialogs
The first look at the APIs - the undocumented Shell Dialogs.

Undocumented Windows: Format Disk Dialog
The second example: the undocumented Format Disk Dialog.

Undocumented Windows: Change Icon Dialog
Number three: the undocumented Change Icon Dialog.

Undocumented Windows: Path Functions
Number four: the undocumented Path functions.



 

 
 

PayPal Link
Make payments with PayPal - it's fast, free and secure!

 
 
 
 

Copyright ©1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy

 

Hit Counter