Results 1 to 40 of 66

Thread: [VB6, twinBASIC] ucDriveCombo - A modern DriveList replacement

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,654

    [VB6, twinBASIC] ucDriveCombo - A modern DriveList replacement

    Name:  ucdctest.jpg
Views: 3527
Size:  41.0 KB
    ucDriveCombo v1.6 - Modern DriveList Replacement
    Updated 19 May 2024

    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.6
    ' A Modern DriveList Replacement
    ' 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.6 (Released 19 May 2024)
    '   -Added ShowHiddenDrives option, default false, to show/hide
    '    drives that are hidden from the user in Explorer.
    '   -Changed default BackColor to standard CB's white.
    '
    '  Version 1.5 (Released 27 Apr 2024)
    '   -(Bug fix) NoFixedUSB option not working
    '   -(Bug fix) Drive type always reported as 0
    '
    '  Version 1.4 (Released 25 Apr 2024)
    '   -The .Drive legacy method now returns the same path for
    '    mapped network drives.
    '   -There's now a drive icon and control name/version in the
    '    combobox during design mode instead of a generic combo.
    '
    '  Version 1.3 (Released 23 Apr 2024)
    '   -The .Drive property now returns names identical to the legacy
    '     DriveList control, and when set, behaves identical to that
    '     as well, only comparing the first letter.
    '   -(Bug fix) ShowRemovableDrives toggled network drives instead.
    '
    '  Version 1.2 (Released 22 Apr 2024)
    '   -Add Drive property get/let for compatibility with DriveList;
    '     it behaves identically to .SelectDriveName.
    '   -DriveCount is now ListCount, for DriveList compat. Also added
    '     .ListIndex for selected index, and .List, same as GetDriveName.
    '   -Add Enabled property get/let.
    '   -(Bug fix) FocusDriveList VB6 syntax error
    '   -(Bug fix) VB6 control bottom cut off
    '
    '  Version 1.1 (Released 22 Apr 2024)
    '   -Autosize UC height to combo height
    '   -Custom drop width now DPI aware
    '   -FocusDriveList method to hopefully partially defray the lack of
    '      a massive and usually typelib dependent in-place activation
    '      hook to handle tab properly. Recommend ucShellBrowse if you
    '      need proper tab key support.
    '   -(Bug fix) DPI variable overridden by old test line.
    '   -(Bug fix) VB6 control bottom cut off
    '
    '  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
    '
    '  Version Beta 1 - Initial release (Released 21 Apr 2024)
    '********************************************************************
    Download From GitHub
    Last edited by fafalone; May 19th, 2024 at 11:54 PM. Reason: New version

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width