1

Scenario

My current O.S. is Windows 8.1 x64, with plans to updgrade to Windows 10 x64 in the near future.

I frequently need to toggle between to show hidden files in explorer.

To solve this, I added a simple contextmenu item via registry, then when I do right click on the background of a folder I have my item that tooggles the hidden files visibility of Explorer.


Problem

Now I would like to make this functionality more accesible to avoid the need of that extra click to open the contextmenu. I would like to integrate the functionality as a shell extension to add a button near the default buttons that are at the bottom-right corner of each Explorer window:

enter image description here


Question

In C# or preferably VB.Net, and preferably using SharpShell library, how can I create a simple shell extension that adds a button with icon there?.

Note that when the button is clicked I need to have some kind of reference to identify the current Window on where I clicked the button.


Research

I've read all the official articles for beginners in this url below, however I didn't found any that talks about integrating an "addon" in Explorer (only about info tips).

I know the existance of some expecific applications such as QTTabBar that adds functionalities in explorer such as menus and buttons via shell extension, It has a C# source code here and I'd anaylez it but it's a very huge VS solution and my main language is VB.Net, it's very unclear for me what the author do in the source code to add "addons" in the Explorer.

EDIT

AWM (Actual Window Manager) example of its Explorer integration:

enter image description here

QTTabBar's Explorer integration:

enter image description here

enter image description here

ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
  • You can't do this robustly, for different windows versions. You'd have to hack. – David Heffernan Oct 18 '15 at 15:18
  • You cannot add a button. You can only add additional panel and it can contain a button. – Denis Anisimov Oct 18 '15 at 15:21
  • @David Heffernan Thanks for comment. If I need to choose a Windows version to ask for a solution then I choose Windows 10 x64 (I'm using build 10565 technical preview in Spanish). Anyways I think that If I could understand the "principle" to hack this then maybe I could reproduce the same for other Explorer versions. – ElektroStudios Oct 18 '15 at 15:25
  • @Denis Anisimov Thanks for comment too.I can give references of applications that adds buttons on the top of Explorer windows exactlly in the titlebar (such as **Actual Window Manager**) however I think that those kind of applications just overlays a transparent window with buttons to make the effect instead of naturally adding buttons in a managed way via shellex. But another app **QTTabBar** can add elements such as buttons and its managed via shellex,for that reason I think is possible.Please could you give some info/article that proofs if what you've said its really a shellex limitation?. – ElektroStudios Oct 18 '15 at 15:35
  • Could you show screenshots of buttons of Actual Window Manager and QTTabBar? – Denis Anisimov Oct 18 '15 at 15:43
  • @Denis Anisimov Yes, please see the last edit I did in my question. – ElektroStudios Oct 18 '15 at 17:10
  • None of those looks like they are actually adding controls to the window. The AWM is adding to the title bar (there is an API for that), the second looks like an elaborate context menu, same for the third except it appears to use an image. I'd be careful about elaborate Shell Extensions fro managed code - MS advises against them. – Ňɏssa Pøngjǣrdenlarp Oct 18 '15 at 18:59

0 Answers0