Expandable folders like in the taskbar

leorob88

Well-known member
Joined
Dec 31, 2020
Messages
71
Programming Experience
1-3
Until Win10 I always used this and I refuse changing to a different O.S. without this feature. So the question comes right away: can this be replicated with a WinForm app? I never did anything like this, ChatGPT tried to help a bit but getting a result too different than what I expected.

Immagine.png
 
WinForms menus have items and submenus and have done for over two decades, so I don't really know what you're asking for that shouldn't already be obvious. Please provide a FULL and CLEAR explanation of the actual problem.
 
So you would suggest using menus for this... may be interesting, didn't think of that as, obviously, i consider a menu just like a menu and not as a proper component/control INSIDE the form. But, provided i size it the same size of the taskbar and make its background invisible (i have an invisible taskbar) this should be a good idea!
Only, I'm thinking what would happen for folders having a too long list of items to fit inside the screen. I don't know if menus have a default behavior to have a top item and a bottom item to scroll upper/lower the list if the total list can't fit in the screen.
 
Last edited:
Look into using NotifyIcon with ContextMenuStrip.
 
Look into using NotifyIcon with ContextMenuStrip.

I looked, it's not what i'm trying to do. I thought the image was clear enough. I'm trying to have a scrollable file/folder list. As i see, notifyicon is just to have icon apps in the tray bar, which is not my goal. The very best would be to have it incorporated in the taskbar but as i know it's not doable on Win11. So i plan instead to open the program over the taskbar. Alternatives can be good if in the end they do the same. But still, working with icons in the tray bar isn't something i would consider, it's a bit too... unhandy? to use... more over because all the icons in my tray bar are inside the tray bar, not outside, so everytime i would need to click and open the tray bar, then maybe click on the icon, or stuff... i just plan to have something way faster and accessible like plain taskbar folders have always been.
 
Last edited:
That screenshot was not very clear about what you wanted. A lot of us have moved on from the Win9x/WinNT/WinXP style taskbar, and I think very few of us used the cascading menus to explore through the filesystem, which seems to be what you are looking for. I'm guessing that a lot of us had the muscle memory ingrained to press Win-E to open up the Windows Explorer to navigate through the filesystem.

Anyway, what you want to do is doable. As you noted, you can park an application to be where the taskbar would have been if you set the taskbar to be always visible. But of course, you would need to be sensitive to the hotspot area that would would activate an auto-hidden taskbar -- but let's say that you have solved that problem/have a solution for that problem/don't care, then it's just always a matter of creating the cascading menus. Just create a WinForm or WPF app that is parked at that location and has a "Start" button or whatever pleases you. I'm surprised that you don't have the "Windows" button at the top left corner like a classic Windows 3.x user.

I would suggest creating the menus on a as needed basis instead of trying to pre-populate them all the way down to the deep folder levels. As you noted, there is some concern about scrolling through a big menu. It's been years since I've tried, but I believe the scrolling feature is built into the menu -- or at least it was back in Windows 3.1 and Win95. If it's not built in, then you may need to resort to doing owner-drawn menus. If the owner drawn menus are too onerous, then just make use of a list box instead of a menu.
 
That screenshot was not very clear about what you wanted. A lot of us have moved on from the Win9x/WinNT/WinXP style taskbar, and I think very few of us used the cascading menus to explore through the filesystem, which seems to be what you are looking for. I'm guessing that a lot of us had the muscle memory ingrained to press Win-E to open up the Windows Explorer to navigate through the filesystem.

Anyway, what you want to do is doable. As you noted, you can park an application to be where the taskbar would have been if you set the taskbar to be always visible. But of course, you would need to be sensitive to the hotspot area that would would activate an auto-hidden taskbar -- but let's say that you have solved that problem/have a solution for that problem/don't care, then it's just always a matter of creating the cascading menus. Just create a WinForm or WPF app that is parked at that location and has a "Start" button or whatever pleases you. I'm surprised that you don't have the "Windows" button at the top left corner like a classic Windows 3.x user.

I would suggest creating the menus on a as needed basis instead of trying to pre-populate them all the way down to the deep folder levels. As you noted, there is some concern about scrolling through a big menu. It's been years since I've tried, but I believe the scrolling feature is built into the menu -- or at least it was back in Windows 3.1 and Win95. If it's not built in, then you may need to resort to doing owner-drawn menus. If the owner drawn menus are too onerous, then just make use of a list box instead of a menu.

"the hotspot area that would would activate an auto-hidden taskbar" i'm not sure i understand what you mean here...

actually start menu can't do what i need. i have in the taskbar 3 different folders to explore (Desktop folder have been kinda since win98 or XP, PC and User folder since more recent O.S.) so i can just get easy and quick files or folders to open, since especially Desktop is a folder i use quite often and i don't consider for a second the idea of minimizing apps just to have access to desktop. So this quick list is the most suitable feature for me.

i'm not sure a listbox can help though... as i know, a listbox doesn't feature icons, does it...? and more than that, now that i think about it, i don't properly know what address i should use to open the computer folder- i.e. the one containing all drives. if i manage to create some sort of listbox with also icons for the elements, then yeah, i could simulate a desktop folder list with a listbox...
 
"the hotspot area that would would activate an auto-hidden taskbar" i'm not sure i understand what you mean here...

It's been years, but as I recall the way the hidden taskbar worked in Win95 and WinXP was such that the mouse cursor could be within 3-5 pixels of the edge where the taskbar was hidden for the taskbar to re-appear. I didn't think that the mouse cursor had to be slammed fully against that edge for the taskbar to re-appear. If my recollection is wrong, my apologies. In that case my comments of the hotspot area don't apply. As long as you don't hit the edge, your app parked at that location shouldn't matter.
 
i'm not sure a listbox can help though... as i know, a listbox doesn't feature icons, does it...?

You can do owner-drawn listboxes. Or use a ListView instead of a listbox.
 
It's been years, but as I recall the way the hidden taskbar worked in Win95 and WinXP was such that the mouse cursor could be within 3-5 pixels of the edge where the taskbar was hidden for the taskbar to re-appear. I didn't think that the mouse cursor had to be slammed fully against that edge for the taskbar to re-appear. If my recollection is wrong, my apologies. In that case my comments of the hotspot area don't apply. As long as you don't hit the edge, your app parked at that location shouldn't matter.

No now on win10 the tray bar is more like this, only clicking on the arrow hides/shows the tray bar, aside that there's only keyboard language, datetime and an icon for the side toolbar for notifications and stuff.

1745771348983.png
 
You'll need to call another API to get the associated icon with a file (or folder). It's not automatically loaded as part of the FileInfo or DirectoryInfo objects.
 
Back
Top Bottom