ucDriveCombo v1.0 - Modern DriveList Replacement
While my ucShellBrowse control is capable of displaying a drive list like this, it's really overkill if that's all you need. I thought VB6 and twinBASIC could use a simple but modernized replacement of just the DriveList control. This project is supplied as a VB6 .ctl that has code which runs unmodified in twinBASIC, with 64bit support. Project files for both are provided. For VB6, you must include mUCDCHelper.bas in your projects. In twinBASIC, this module is combined in the same .twin file as the control.
**No typelib or package dependency!** Just need the .ctl/.ctx/.bas for VB6 or the .tbcontrol/.twin for twinBASIC; doesn't require oleexp, WinDevLib, or any similar dependencies.
Full readme:
Code:
'********************************************************************
' ucDriveCombo v1.0
' by Jon Johnson
'
' Provides a modernized option for a Drive Combo without the extra
' complexity of a full blown ucShellBrowse control.
'
' Requirements: VB6 or twinBASIC Beta 515
' Note: This file combines the mUCDCHelper module; in VB6 that
' must be in its own .bas.
'
' Features:
' -Same codebase for VB6 and twinBASIC
' -64bit compatible
' -Filter drives shown by type
' -Uses same friendly name and icon as Explorer
' -Monitors for drive add/remove (optional)
' -Supports both dropdown list and standard dropdown styles
' -Drive selection can be get/set by path, letter, or name.
' -SelectionChanged event
' -Can provide list of drives
' -Can optionally classify USB hard drives as removable.
'
' Changelog:
' Version 1.0 (Released 22 Apr 2024)
' -Add Property Lets for SelectedDrive_____
' -Add device add/remove monitoring via RegisterDeviceNotification
' -Add DPI aware support
' -Add DropdownWidth option
'
'********************************************************************