Add a new category to the navigation bar of the windows files explorer - vb.net

How can I programmatically add a new category to the navigation bar of the windows files explorer. I mean something like this (For Example)

It is namespace shell extension. NSE must be registered in Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\NSE_CLSID. Also it must implement IPropertyStoreFactory and must return True when system requests value of PKEY_IsPinnedToNameSpaceTree property.

Related

Visual studio 2015 use the navigation bar to switch context

By clicking on a certain command in my code, I get the information not available and available within my project. I do not understand how this is possible, and informs me that you can use the navigation bar to switch context, but I do not know how to do that. The attached figure shows the message. My questions are:
How can something be available and not avilable in the same project?
What is the navigation bar and how do I use it to change the context?
This is the message I received:
Usage:
Dim r as list (of Streaming) = Await StartAsync(...)
MSGEM – Available
MSGEM – Not Available
You can use the navigation bar to wsitch context.
This could be be down to two front-end files sharing the same back-end codefile. In such a situation, the code file will reference a front end control which is in only one of the front end files and not both.
If you do not use such a coding technique, it can easily happen accidently when making a backup of a front end code file by copying it to a different filename but forgetting to add the .exclude extension.
See this answer for more details:
You can use the navigation bar to switch contex

How to add a property page to DirectShow filter

I have written an DirectShow-Filter *.ax to integrate a Hardware (Camera). All works fine with my filter.ax and there Transport Images to Skype success.
Now I am want to integrate a Dialog to handle the camera-options with UI.
In my Filter.ax is calling the function QueryInterface(REFIID riid, void **ppv)
when riid == IID_ISpecifyPropertyPages
I am have seen that the Dialog must be in a other DLL like Com ?
My try to open the Dialog directly works, but no windows Messages are incoming.
I must also write an MFC Dll they is starting by PropertyPage IIID ? My Propertypage is a large MFC Controles TabControl with some items. I can see it if i start the filter from MFC Test app. AfxInit I can't execute. (Wrong Lib versions I must use the directshow baseclass(knowledge example)
I don't now why my Dialog got no Messages, what is the right way ?
You don't need to implement a property page in a separate DLL (even though it is a possible).
DirectShow filter property pages are regular COM property pages implemented using ISpecifyPropertyPages. Property pages are separate COM objects implementing well known interfaces like IPropertyPage.
Windows SDK Ezrgb24 sample shows how to implement a simple transform filter and also features a property page (CEZrgb24Properties class). It should be a good start for a property page implementation for your filter.
If you prefer to implement the property page in a separate DLL, a typical way is to define a shared COM interface, the filter would implement it and reference the property page by its CLSID, the property page would query this interface from the filter instance and use it for configuration actions.

How to use a custom icon in a dolphin smalltalk treeview?

In a Dolphin smalltalk treeview I'd like to use a custom icon, depending on the state of the item displayed, (differente state, different icon)
How can I do that ?
I cannot really understand how to use a "my" icon.
I've create a class "connection", with an instance variable "connected"
and two class methods "connectedIcon and unconnectedIcon that returns icon images.
Then an instance function "icon" that returns one or the other image based on the connection state.
I can add instances of this class to a tree view and see the name of the connections.
But how to show my Icons ?
I tried to sustitute the getImageBlock of my presenter view with the following expression [:obj | obj icon] but it doesn't work.
(nothing seems to happen).
this is made in my presenter initialize :
initialize
super initialize.
treePresenter view getImageBlock: [:obj | obj icon]
what's wrong with it ?
best regards
Maurizio
When you are editing a TreeView, one of the properties is getImageBlock. By default it is not really a block but another object that understands the message #'value:' (the class IconicListAbstract). You can replace this property with a code block (or other object that understands #'value:') and answer the image you want displayed.
In Microsoft Windows, icons are typically stored in a DLL. You should be able to use an icon explorer or editing tool to see the icons in a dll. For example, get IconExplorer from http://www.mitec.cz/iconex.html and try opening DolphinDR7.dll. Do the icons and numbers match what you see when you return a number in your application?
To determine (or override) the resource library used, see SessionManager>>#'defaultResLibPath'.
Typically, the getImageBlock is set using the property editor in the GUI editor, but setting it through code can work as well.
Wonderful Dolphin Smalltalk!
I had two problems
1) how and where to modify the getImageBlock method of my Treepresenter.
2) where to put the icons ad how to get the imageindex of each icon.
This is the solution :
1) it's not needed.
The treeview sends an #iconImageIndex" message to my model
this is handled by the default method (in the Object class) that send to my object the message #icon
and to the result of this message (an icon) the message #iconIndex.
This message is understood from the icon that answers with its own iconIndex.
So the only method I need to impement is #icon in my class Connection
that I implemented as follows:
icon
opened ifTrue: [^Connection connectedIcon] ifFalse: [^Connection unconnectedIcon]
In the class itself the two icons are imported in the image by evaluating the createIconMethod,
as explained in the blog article 'Beauty with less Beast'.
So my problems are solved.
Thanks to all.
Maurizio.

How do I add my privacy policy link to the Windows Settings charm with Unity?

Windows Store rule 4.1.1 mandate that:
You must provide access to your privacy policy in the Description page
of your app, as well as in the app’s settings as displayed in the
Windows Settings charm.
The Description page is easy, since when you setup your app in the store there's a field where you can enter the URL.
However I'm a bit clueless about how to add this entry in the Windows Setting charm in a Unity project. I've found this answer but that assumes you are in full control and knowledge of your Windows Store app, while I'm just exporting from Unity, so I've no clue on where I would put that code.
So, how do I do that?
Unity is exporting the game as JS or C#.
So have a look to these samples http://code.msdn.microsoft.com/windowsapps/Windows-8-Modern-Style-App-Samples. In these samples, there are a few Setting Charm screnios that you can use in your application.
But remember that, you should add setting charm after export the game.
The plugin prime31/MetroEssentials has the function registerSettingsCommand, which allows you to do just that.
// Registers a settings item with an associated message that will be displaed in a popup when clicked
public static void registerSettingsCommand( string title, string message )
// Registers a settings item with an action. When the settings item is clicked the action will be called.
public static void registerSettingsCommand( string title, Action onActivated )

Show icons in the dock contextual menus in OS X?

My question is quite simple :
To use a custom menu for the apps icon on the dock, - (NSMenu*) applicationDockMenu: (id) sender; of the NSApplicationDelegate has to return the menu that the dock will display.
Using setImage on a NSMenuItem, you can normaly add icons to the menu. They show up on the normal menu, but not on in contextual menu of the app's dock icon.
Then how did Apple manage QuickTime, XCode, Preview to show icons in the list of recent opened files accessible in their dock contextual menu ?
Thx.
The recent files list is actually part of the standard Dock icon menu. To use it in your app, you should build an NSDocument-based application. By using NSDocument, you will get the recent files menu/behaviour for free.
If your application cannot be based on NSDocument, you can instruct Cocoa to maintain a recent documents list based on URLs:
NSDocumentController *docController = [NSDocumentController sharedDocumentController];
[docController noteNewRecentDocumentURL:locationOfMyRecentFile1];
[docController noteNewRecentDocumentURL:locationOfMyRecentFile2];
[docController noteNewRecentDocumentURL:locationOfMyRecentFile3];
Note that currently, -noteNewRecentDocumentURL: only supports file:// URLs (which you can create from a path with +[NSURL fileURLWithPath:].) In the future, its behaviour will presumably change to allow URLs with other schemes.
Here's my understanding, which is partly conjectural and related to implementation details:
The Dock runs in a separate process, and you can't pass an arbitrary NSImage trivially across the process boundary from your application to the Dock. There are only two kinds of images that can be passed properly: standard system icons, and icons in your resource bundle. But I don't think NSImage does the necessary incantations for either of these to work.
So you're going to have to use Carbon. Specifically, you need to use SetMenuItemIconHandle with either kMenuSystemIconSelectorType (covers Carbon IconRefs, obtained with GetIconRef) or kMenuIconResourceType (CFStrings that refer to an .icns file in your application bundle's Resources folder).
The relevant headers are <HIToolbox/MacApplication.h> (for GetApplicationDockTileMenu), <HIToolbox/Menus.h> (for SetMenuItemIconHandle) and <HIServices/Icons.h>, (for GetIconRef, if you're using system icons).
Untested, but it should look something like this:
#include <Carbon/Carbon.h>
SetMenuItemIconHandle(
GetApplicationDockTileMenu(),
[dockMenu indexOfItem:dockMenuItem],
kMenuIconResourceType,
(Handle) CFSTR("icon.icns")
);
It may not be this simple; some of this may be 32-bit only.