How to customize the windows shell to display files from a remote source and allow custom drawing? - windows

Is it possible, (via some shell extension or similar) to customize the Windows shell (explorer.exe) to accomplish the following?
Make it, upon navigating to a predefined path:
draw over its surface - custom background, or even add custom forms for data input
display custom listview items based on the "virtual" path provided (something analogous to what explorer is doing when browsing a FTP repository - the items shown are not contents of a local folder, but rather some "virtual" items physically located on the FTP server)
The idea is to reuse the visage and navigation elements of Explorer without re-implementing the whole functionality and make it look native on all Windows versions for a remote file browser (file lists+files alone served by a custom web service).

I think you need to implement a Explorer Namespace Extension. There is some good information floating around on codeproject etc that you will probably need since the official documentation is not the best.

Related

Possible to include an image in the meta data in code? VS 2013

I would like to be able to include a screenshot of a control inside my code, this way making control identification easier for new members on my team, is such a thing possible?
Maybe even the ability to just have the image on a network share with the path in a comment, and then have a plugin that when hovering over the link brings up the image?
EDIT (More detail):
I'm creating a test project, the application under test has over 1000 controls, some of them are similar in name and purpose, this can make it difficult at times for developers to reuse the API I am creating because the control name is simply not enough for quick identification of the control in use.
I use the word API very loosely too, none of this stuff will be consumed in web services, and it will always be white box with developers including a project reference and have direct access to the source code.
For every form in my application (The test one), I have a controls.cs file where all the controls for that form in the application under test are listed - This is where I want the hover to screenshot ability in the control definitions.
Another sure factor is that all developers will be using VS2013 (For now the base version), later this could be update 1 or 2.
As the initial author and senior developer on this project, these hover / image references (in the code) will be as useful to me personally as any 3rd party developers, or any later developers to join the initiative.
Thanks again, and I added a bounty!
I believe you can use Whole Tomato's free SourceLinks Visual Studio extension to do what you want - or at least get pretty close to it.
Built-in Functionality:
Out of the box, the extension allows you to specify comment patterns you want users to be able to take an action on. Once the patterns are specified, SourceLinks will highlight any occurrences of those patterns in the text editor. You will be able to double click the highlighted items and perform a pre-configured action (such as opening a link in an internal/external browser, or launching an executable).
You can see an example in the SourceLinks configuration dialog shown below:
(source: wholetomato.com)
So you could use this feature pretty painlessly to define a keyword such as Control Image and then put comments like the following in your code:
// Control Image: my_smart_list.jpg
SourceLinks would allow you double click this text, and you could have that configured to launch the image (using a file:// or http:// url depending on how and where your images are stored) either inside Visual Studio in it's internal browser, or in an external browser.
Custom Tooltips!
Now, if you want to put in some more effort into this and actually write some code, then SourceLinks allows you to create API Extensions to display custom tooltips when the user hovers over the marked text in the editor. The default installation of SourceLinks comes with sample API extensions that you can copy to create your own. See the article linked at the very top of the answer for more details on these samples.
This post in the SourceLinks forum informs us that SourceLinks expects the custom API Extension to return the tooltip value as FlowDocument XAML text. This is awesome news for us, because a FlowDocument can contain many types of elements, including formatted text, hyperlinks, and images.
Imanges in a Flow document can be specified both inline as well as externally.
Hope this helps!
I would use doxygen -- create the images somewhere in the source tree and use doxygen comments. You can embed the \image command in source comments (see docs) and doxygen will generate all the HTML documentation from there. I think doxygen is a great tool for documenting a codebase as you can generate the documentation directly from comments in the source and distribute or host the HTML separately.

Creating custom windows in NSIS

I want to customize our installer which is based on NSIS. My question is could we create custom windows? Where I mean not customizing Modern UI or other built-in surface, but building a totally new look with custom Window header, buttons and other elements like list where all element have other state, and all of the states are represented with an animated item before the text.
So I want to develop my look from ground to the peak. This can be done somehow?
You can do this using a resource hacker of your choice, e.g. PE Explorer, XNResourceEditor, Resource Hacker FX or good old ResHacker. You'll have to make sure to use the same IDs for the controls, so you probably best start by editing on of the existing UIs.
Like idleberg said you have to edit one of the .exe resource files (in the Contrib folder) with a resource editor. To apply the new UI you have to use the ChangeUI instruction. You can change all pages or just a single page...

Modify contents of Firefox download dialog from add-on kit

I'd like to be able to add an option to the download dialog that pops-up in Firefox when starting a file download. Is it possible to do so using the new add-on SDK or do I have to do it the old way?
edit: Obviously, if the new option is selected, I need a way to know it and execute code based on it.
That's something you would use XUL overlays for. I guess that the dialog you are talking about is chrome://mozapps/content/downloads/downloads.xul - the download manager. AFAIK doing this isn't possible with the Add-on SDK, it only provides the most common UI integration points. You could create a traditional extension however, it can overlay any dialog.
There is no existing module that will help you that I know of, so you would have to create one, or wait for one to be made by someone else. But the main idea to extending browser UI is simple, and goes like this:
When the addon is loaded, scan for open windows of the type that you wish to extend.
extend the open windows by adding xul elements and javascript to the page.
listen for newly opened windows, and test that they are the type that you are looking for once they open
extend newly opened windows while your addon is active
Clean up after yourself when windows close or when your addon is disabled/uninstalled.
The last step is the most important and never matter with old school extensions which were not restartless.
Some for the built-in modules that you can look at that do this are the widget module, the context menu module, and the hotkeys module, all of which you can find here.
I've made a couple myself which are the toolbar button module, the xulkeys module, the menuitems module, and a few others, all of which you can find here.
Recently I wrote an extension do the same things. A bootstrap extension, not using addon-sdk.
I already submit it on AMO, but wait for review
https://addons.mozilla.org/en-US/firefox/addon/download-dialog-tweak/
And the source code
https://github.com/muzuiget/download_dialog_tweak

A way to prevent 3rd-party elements to be loaded on Safari?

Basically, I'm looking for RequestPolicy for Safari. GlimmerBlocker, Privoxy and BFilter etc, those work well but none of them support "block 3rd party elements" feature.
I use GlimmerBlocker, and to imitate (barely) the function, I mainly put this code to filter script flooded website.
replace(/<(script|noscript|iframe)([\s\S]*?)<\/(script|noscript|iframe)>/img, "")
However I'm tired of repeating creating filters for each websites. Vice-versa, whitelisting will be the same.
If anybody had an idea to solve this, that would be so great. Thanks.
I made this proof-of-concept Safari extension to block external resources (images, objects, and scripts, but NOT link elements, such as stylesheet links) until allowed. It has a bare minimum number of features, but if you are interested, I might develop it further.
I say "external" and not "third-party" because I don't know to tell reliably if a resource is third-party or not. This extension just blocks all resources that come from a different host than the web page. As a result, it blocks too many resources by default.
You can right-click a blocked image and use a context menu command to whitelist the image host. If the blocked image didn't have a specified width and height, it will be invisible, so you won't be able to right-click it. (To remedy this, I will need to add code to make the empty image visible as a box.)
The whitelist command does not show up for blocked plugin objects (such as Flash objects) or scripts. I will have to add code to deal with that.
You can also whitelist the current site itself, meaning that all external resources will be allowed on that site. Again, this is done with a context menu command.
As yet, there is no way to remove items from either whitelist. This can be added.
Download the extension from here.
You can extract the source files from the extension package using this command:
xar -xf PartyPooper.safariextz
You are welcome to do whatever you like with the source.

How do I write a custom search provider for Windows Explorer search UI

I am working on a Windows Explorer Namespace Extension which is a virtual filesystem. With regards to this, I would like to support search from the search dialog available in Windows Explorer.
Currently I'm able to search by name in the folder I'm standing in, but I would like to be able to search in the complete structure and also within content of the virtual filesystem, and since Windows Explorer cannot do this, I need to hook in a custom search provider.
Since it is a virtual filesystem, it would be beneficial if I could write a custom UI for displaying the result, but this isn't mandatory.
The custom Explorer namespace extension is written in C#, but the API doesn't need to be wrapped. Any pointers to API documentation, commercial products and/or samples would be appreciated.
If you are using defview as your shell view, return FWF_USESEARCHFOLDER in IFolderViewSettings::GetFolderFlags. Sample implementation can be found at http://regnamespace.codeplex.com/.
From http://msdn.microsoft.com/en-us/library/bb331575(v=vs.85).aspx :
If your IShellFolder implementation does not use SHCreateShellFolderView to create the DefView, the Shell view object may need IFolderView.
There is also confused user who need to support shell namespace extension folder searching in file dialogs.

Resources