-
Feb 10th, 2024, 10:53 PM
#201
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Originally Posted by Mith
Great, it works now!
The hidden AppData folder is now visible!
I was kidding myself, because i had the visibility options in the Windows explorer settings turned on!
Now im back where i started!
The enumeration of ShellObjects depends on the visibility settings of the Windows Explorer
But why do they offer the flag SHCONTF_INCLUDESUPERHIDDEN if it has no impact when used?
Last edited by Mith; Feb 10th, 2024 at 11:13 PM.
-
Feb 11th, 2024, 02:47 AM
#202
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Wait I made a mistake... I didn't have ShowSuperHidden = True so the control itself was filtering them out. It's partially working for me on Server 2019 now (either SHCONTF method).
Something funky is going on though... it's showing hidden/system items everywhere except Users\Administrator on Server2019. Including Users\Default. It shows the H/S items for my logon on Win10 Enterprise LTSC; so this is a server 2019 issue I think.
-
Feb 11th, 2024, 03:30 AM
#203
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
I tested the new enum method with Server2019 and 2022 and i cant see the hidden AppData folder until i activate the visibility option in the explorer.
I guess i should post the problem at stackoverflow and ask the experts why SHCONTF_INCLUDESUPERHIDDEN is ignored when enumerating the content of a folder.
Last edited by Mith; Feb 11th, 2024 at 03:34 AM.
-
Feb 11th, 2024, 03:42 AM
#204
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
It's not.
It's ignored on Server 2019 (and apparently 2022) in Users\Administrator, and works everywhere else. It's showing AppData et al in every other user folder. It's showing $RECYCLE.BIN and System Volume Information in C:\... it's working. Except that single folder.
-
Feb 11th, 2024, 04:46 AM
#205
-
Feb 11th, 2024, 06:53 PM
#206
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Today i have some good news for all OCX lovers
After many code changes i tried to compile the control as an OCX with binary compatibility again and this time is was successfull!
I guess it was the subclassing code change. How knows...
ucShellTree can now be used as an OCX in your projects. That will make it a lot more easy to update all your projects!
There are currently only 2 known bugs:
- Item rename crashes (LabelEditRename should be disabled until fixed)
- MonitorDirChanges not work correctly
I tested the control successfully with Win7,8,10,11 & Server2008R2,2012,2016,2019,2022. Vista isnt supported due some missing shell API support.
@fafalone
How to make the changes public so other people can use or test the enhanced ucShellTree project?
My changes since v2.9.2 (ALPHA, 29 Jan 2024, fafalone):
'v2.9.4 Mith
' - TVExpandFolder: Added a new filter method to enumerate items
' BindToHandler -> EnumObjects -> e.g. SHCONTF_INCLUDESUPERHIDDEN
'
' - replaced the thunk subclassing with Krool's subclassing
' the control crashed on all Windows Server editions because the Windows DEP protection is
' activated for all apps per default
'v2.9.3 Mith
' - Added project variable mCreateShellTreeManually.
' True = you have to call the new public function "Create_ShellTree" to create the ShellTree.
' This enables you to set up all control properties in the code before the ShellTree
' is created. Also avoids the enum of the ShellTree with the standard properties
' False = ShellTree will be created automatically after reading the usercontrol properties
'
' - Added project variable mHideLNKfileExtension.
' True = hiddes the .lnk file extension
' false = shows the .lnk file extension
'
' - Added property ShowOnlyDrives. Shows only drives when ComputerAsRoot=True and
' deactivates the expanding of drives
' - Added property HideRecycleBin. hides the recycle bin
' - Added property HideControlPanel. hides the Control Panel
' - Added property HideOneDrive. hides OneDrive
' - Added property HideNetwork. hides Network
' - Added property HideLibraries. hides Libraries
'
' - ItemClick event: now you can cancel the item checked/unchecked setting by changing the
' value of the variable fCheck (unchecked: fCheck=0, checked: fCheck=1)
'
' - Added property ShowOnlyFileCheckbox. This option hides the checkbox for all non-files
'
' - (Bug fix) overlay icons are not displayed correctly. added a new imagelist for 16x16 overlay icons
'
' - (BUG fix) m_ForceExt = STEP_AlwaysShow didnt not show all file extensions (zip, url...)
'
' - converted the latest twin basic ucShellTree Project to VB6
'v2.9.2 (ALPHA, 29 Jan 2024)
' ...see TwinBasic project
-
Feb 11th, 2024, 09:15 PM
#207
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
If you're going to keep updating it, I think your own thread would be best; the ctl version goes here, the OCX version in Utilities - Components along with my old ocx versions and the VBCCR ocxs Krool makes. Just note it's a fork of my project; I'm happy to see such things
You're definitely going a lot faster than I'll be able to update the main branch here or the newer tB branch; I've implemented some of your changes but not all and have so many things I'm trying to work on. Are you planning to update the tB version as well? If not I'll at least try to do that to make the enhancements available there.
-
Feb 12th, 2024, 12:59 AM
#208
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
I will share the updated ShellTree by user request. I dont want to start a new thread with a forked version.
I dont use TwinBasic, so i only update the VB6 control. Currently i have no time to upgrade my apps to TwinBasic.
Please let me know about bug fixes or new features so i can update the control.
My current tests with the enhanced VB6 ShellTree control are all successfully. Next step is to update my apps to use the OCX version.
-
Feb 12th, 2024, 02:33 AM
#209
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Ok, at least attach it to a reply in this thread then, if you're still meaning to share it with others, I'd like to get a copy so I can update the tB version and eventually the VB6 version on the first post of this thread. Or you can PM it to me if you didn't want such broad exposure. Or not, your fork, up to you.
-
Feb 12th, 2024, 04:24 AM
#210
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
ucShellTree v2.9.4 download: ucShelltree294mith.zip
Included files:
ucShellTree.ctl
ucShellTree.ctx
ucShelltree.bas
To use it as an OCX it would be better to convert this project variables to public control properties:
Code:
Private Const mNeverExpandZip As Boolean = True 'Never expand a zip under any circumstances.
Private Const mHideLNKfileExtension As Boolean = True
Private Const mCreateShellTreeManually As Boolean = True
Last edited by Mith; Feb 12th, 2024 at 04:28 AM.
-
Feb 12th, 2024, 08:26 PM
#211
Hyperactive Member
Drives with network shares are not displayed in the tree
I found another problem while testing the control:
Drive letters linked to network shares or local folders are not displayed in the ShellTree.
For example, i mapped the network share "\\nassrv\data" with Z: but i cant see the drive Z anywhere in the control.
Do you have any ideas how to show them in the tree?
-
Feb 12th, 2024, 08:58 PM
#212
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
I found the problem:
The new enum method doesnt include these kind of drives:
Code:
lReturn = pISF.EnumObjects(0, _
SHCONTF_CHECKING_FOR_CHILDREN Or _
SHCONTF_FOLDERS Or _
SHCONTF_NONFOLDERS Or _
SHCONTF_INCLUDEHIDDEN Or _
SHCONTF_SHAREABLE Or _
SHCONTF_STORAGE Or _
SHCONTF_NAVIGATION_ENUM Or _
SHCONTF_INCLUDESUPERHIDDEN, _
pEIDL)
Switching back to the old method fixed the problem!
There is always a drawback when fixing a problem!
In this case i wanted to show all hidden items but in the end the AppData folder still isnt visible and now the linked drives are not visible too...
-
Feb 12th, 2024, 09:01 PM
#213
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Don't include all those flags. Try
SHCONTF_FOLDERS Or _
SHCONTF_NONFOLDERS Or _
SHCONTF_INCLUDEHIDDEN Or _
SHCONTF_INCLUDESUPERHIDDEN,
-
Feb 12th, 2024, 10:15 PM
#214
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Originally Posted by fafalone
Don't include all those flags. Try
SHCONTF_FOLDERS Or _
SHCONTF_NONFOLDERS Or _
SHCONTF_INCLUDEHIDDEN Or _
SHCONTF_INCLUDESUPERHIDDEN,
Now the linked drives are visible at "This PC". Is it normal that they are not visible at "Desktop"?
-
Feb 13th, 2024, 12:48 AM
#215
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Mine have always been only under ThisPC. Only my external USB drives show up as children of the Desktop.
You said they were showing with the original method; is it different with that?
-
Feb 13th, 2024, 03:34 AM
#216
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Originally Posted by fafalone
You said they were showing with the original method; is it different with that?
No, its not different with the original method. I was just wondering why not all drives are shown at the Desktop branch. I guess at Desktop you only see drives that are available for all users and at "This PC" they also show drives that are only available for the current user.
-
Feb 13th, 2024, 04:02 AM
#217
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Win 10 german enum comparison:
They look the same, the old enum in the middle and the new enum at the right.
I just saw that the overlay icon for linked folders is gone. See left vs middle&right.
And the folder "C:\Programme" aka "C:\Program Files" is displayed twice.
One can be expanded and the other one is a link and cannot be expanded.
I checked this with the original v2.7, same result, displayed twice.
Last edited by Mith; Feb 13th, 2024 at 04:09 AM.
-
Feb 13th, 2024, 04:24 AM
#218
Hyperactive Member
Fixed: Overlay icons are not visible
Originally Posted by Mith
I just saw that the overlay icon for linked folders is gone. See left vs middle&right.
I found the problem: you removed "Or ILC_MASK" at InitImageLists at your TB project and i copied your code!
Add the flag again to see overlay icons:
Private Sub InitImageLists()
himlTV = ImageList_Create(mIconSize, mIconSize, ILC_COLOR32 Or ILC_MASK Or ILC_HIGHQUALITYSCALE, 1, 1)
...
End Sub
-
Feb 13th, 2024, 04:41 AM
#219
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Just a heads up I found a bug where if you have dpi awareness enabled, IconSize will continuously increase on subsequent runs from the IDE (including reloads in designer). Need to remove mIconSize = mIconSize * m_ScaleX in pvCreate, cxy = cxy * m_ScaleX in Property Let IconSize, then change all the other uses of it (besides prop read/write/init) to scale there, e.g. TVEntries(1).nIcon = TranslateIcon(lpIcon, siFav, pidlParF, pidlFav, mIconSize * m_ScaleX, mIconSize * m_ScaleY, pidlChF)
Edit: Re: ILC_MASK, must be a versioning thing I added that in after finding out the overlays were no longer showing up after I added IconSize.
-
Feb 13th, 2024, 05:01 AM
#220
Hyperactive Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Changes done:
' - (Bug fix) if you have dpi awareness enabled, IconSize will continuously increase on subsequent runs
'
' - (Bug fix) drives linked to network shares are not displayed at the branch "This PC"
'
' - (Bug fix) overlay icons are not displayed because of the missing flag ILC_MASK
' in the function InitImageLists
Looks good at Win11 DPI 175%:
-
Jun 2nd, 2024, 02:10 AM
#221
Fanatic Member
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
[deleted] due to misleading info.
Last edited by DaveDavis; Jun 2nd, 2024 at 02:28 AM.
-
Jun 7th, 2024, 10:43 AM
#222
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Originally Posted by Mith
Today i have some good news for all OCX lovers
After many code changes i tried to compile the control as an OCX with binary compatibility again and this time is was successfull!
I guess it was the subclassing code change. How knows...
ucShellTree can now be used as an OCX in your projects. That will make it a lot more easy to update all your projects!
There are currently only 2 known bugs:
- Item rename crashes (LabelEditRename should be disabled until fixed)
- MonitorDirChanges not work correctly
I tested the control successfully with Win7,8,10,11 & Server2008R2,2012,2016,2019,2022. Vista isnt supported due some missing shell API support.
@fafalone
How to make the changes public so other people can use or test the enhanced ucShellTree project?
My changes since v2.9.2 (ALPHA, 29 Jan 2024, fafalone):
I think there should be a way, such as using a notepad. Or the setting can directly replace these changed codes with the original huge project.
Then which of your new version functions have been merged and which have not?
We need a tool for such management.
Perhaps it is best to use github in this way.
We have a new feature that we can request to be incorporated. If you are not afraid of merging, you can use it as a virtual mirror. It doesn't actually take up more hard drive space, it's just a configuration.
For example, translate the twinbasic IDE into the languages of different countries. We just need to write a translation settings file to replace the text in the web page with other languages. This configuration only needs 20kb.
Suppose, suppose we add a version flag to each control or piece of code. At top of code file (*.frm, CLS, *.ctl) Is 64-bit supported? [supportx64=1] [codeVersion=2.2] On the vbforums forum, it is also difficult to make it an automatic update version. And the site may one day go out of business or the hard drive is damaged.So it would be better to release all the source code to a github open source project. What is uploaded to VB fourms is just a copy of the old version. We also need a VB6 version of the github automatic version control system plugin. Just like the software installed on our computers is automatically upgraded. A function or a module can be versioned. Some code has been changed, and it can be replaced directly from the original version to the last five versions. However, some modules can only support continuous upgrade from a certain version.
Last edited by xiaoyao; Jun 7th, 2024 at 10:57 AM.
-
Jun 7th, 2024, 10:57 AM
#223
Re: [VB6] ucShellTree - Full-featured Shell Tree UserControl
Mith posted his version with those changes in post #210.
They're also available in the twinBASIC version of ucShellTree, which is several versions ahead of the VB6 version here.
If you want to talk about translating tB, do it in the tB forum, tB GitHub, or tB Discord. Not in my ucShellTree thread.
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|