ShellPlus Customer login
ShellPlus
Shell+ components
    Home
    News
    Overview
    Download
    Examples
    Customer's area
    Flash Demo
 
Developer Tools
    Shell Reset Tool
 
Shell+ Tutorial
    Namespace Extensions
    ShortCut menu
    Property Sheet
    Icon Handler
    Thumbnails
    InfoTip Handler
    Copy Hook
    Balloon TrayIcon
    Control Panel
    Shortcut Files
    Drag&Drop Menu
    Shell Change Notify
 
 
Documents
    Articles Index
    Press Releases
 
Purchase
    Buy now
    Resellers network
    Resellers wanted
 
Support
    Contact directly
    Customer's area
 
About/Contacts
    Shell+ Developers

Embarcader Technology Partner

 
Namespace extension Example

    Use this kind of Shell Extensions to create your own virtual folders and items to Windows Shell namespace. Using these extensions your users will be able to reach the data through native Windows Explorer interface. This example will show how to use a couple of forms and a few components to implement your own namespace extension.

    The Namespace Extension is an ActiveX library like all other Shell Extensions. The first step to do is to create a new ActiveX Library. Create it with the following sequence of operations: open the Repository dialog using File | New | Other... menu, then select the ActiveX tab and click the ActiveX Library icon.

Create New ActiveX Library
Fig. 1. New ActiveX Library creation.

    Save the created project.

    The next step is to add the instance of TSxDataModule to the project. Every Shell+ component should be placed on SxDataModule 1. This special descendant of TDataModule supplies several internal methods that allow Shell+ components to safely operates in multiple Shell threads and automates their registration and initialization. Note that you can place several Shell+ components onto the same SxDataModule as well as you can add multiple TSxDataModule instances to your project. It is easy to add new SxDataModule to the project - just click corresponding icon in the Repository:

Create New Shell extension module
Fig. 2. How to create new SxDataModule instance.

    You can save the project now.

    Every Namespace Extension library has to operate inside the Windows Shell browser - Explorer.exe. Let's consider the figure below to learn more about different parts of the Explorer. As you can see there are two Shell+ components that help you to implement your own namespace. The first one - TSxVirtualFolder - controls folders and files. The second one interacts with Explorer's menu, status bar and toolbar.

Windows Explorer inside

    Add the TSxVirtualFolder now. Use this component to create namespace items that are not related with file system structure. The registration data of extension based on this component will be stored in registry. Note that it is one of several possible registration methods. This method has a limited number of junction points if compared with file-related method of registration. On the other side only this method allows to add extensions to system virtual folders such as "My Computer", "Control panel", "My network places" etc.

    Look on the properties of TSxVirtualFolder component:

CLSID2

Automatically generated GUID. All shell extensions use it to be identified by system.

Description

Extension description, enter desired text here.

ExtensionName

Short name of the extension, MyNamespaceExtension for example.

Name

An ordinary name of the Delphi component.

Attributes2

Attributes of the root folder of the extension.

ContextMenuHandler2

TSxContextMenu link. This component will show the context menu for your shell extension. Important: always place these two components on the same form..

DataProvider

Data provider reference. Several types of data providers are available. The data can be static (TSxSimpleTreeProvider) or dynamic (TSxDataSetTreeProvider), they can be stored in file or modified in run-time. In other words there are many ways to implement shell extension behavior you need and below you will find a details explanation how to use some of them.

DefaultIcon2

Default icon of the root folder. It is stored in a form: [filename],[icon index]. For example: ExNSESysShellView.dll,0

DeleteOptions2

This property controls what occurs when user tries to delete the root folder of the namespace extension. Windows Shell can prohibit the operation or hide it from users.

ExtractIconHandler2

TSxExtractIcon reference. Use it to supply dynamic icons for your extension. Note: this component must be placed onto the same form as TSxVirtualFolder.

HideFolderVerbs2

If this property is True the context menu of your extension will hide standard verbs Open and Explore...

JunctionPoint2

Select one of virtual system folders to attach your namespace extension there. The opportunities are: Control Panel, Desktop, Entire Network, My Computer, Network Neighborhood or Remote Computer.

PropertySheetHandler2

TSxPropSheetExt reference. Use this component to add property pages to the root folder of your namespace extension.

QueryForOverlay2

If this property is True then Windows Shell will query your extension about overlay icon for the root folder of the namespace extension.

ShellCommands2

This property controls the context menu commands to displayed for the root folder. Enter commands you would like to override there. Sub-property AnotherCommands you can specify your own additional commands for the Namespace extension.

ShellView

Folder view manager reference. This component controls how the contents of the extension will be displayed at the right pane of Explorer.

StaticInfoTip2

Info tip for the root folder of your namespace extension.

WantsForParsing2

If this property is True then Windows will ask for file and folder names for every element of your namespace extension.

Table 1. TSxVirtualFolder component properties

    Configure the Shell View component now. This component shows the list of files and folders at the right pane of Explorer. The TSxSysShellView is used below in this example. This component uses the native Windows 2000 and Windows XP abilities of the Shell View.
  Note that this component must be placed on the same form as the Shell Folder component. Use the ShellView property of the TSxVirtualFolder component to link them.

    TSxSysShellView has no special properties to be configured.

    Add one TPermanentModule to the project. The difference between this TPermanentModule and TSxDataModule is that the TSxDataModule is created dynamically and can be unloaded at any time while TPermanentModule exists always in one instance. It is this module should carry all data-related components such as TDataSet successors, TSxDataProvider successors and their related components.

    Place a TSxSimpleTreeProvider component onto this Data Module. Connect it to the DataProvider property of the TSxVirtualFolder. Do not forget to modify the uses clause to avoid compiler errors.

    Right click the component now. You will see the menu with a "Tree editor..." item at the top. Select this item. The editor of the TSxSimpleTreeProvider will appear.

Simple Tree Component Editor


    The properties of TSxSimpleTreeProvider component are as follows:

BackgroundContextMenu

TPopupMenu reference. This menu will be shown when user right clicks the right pane.

BasicVerbs

Explore, Open and Properties menu items. Use this properties to override standard verbs.

CommonContextMenu

TPopupMenu reference. This menu will be shown for folders and files of your namespace extension.

FileContextMenu

TPopupMenu reference. This menu will be shown for files only.

FolderContextMenu

TPopupMenu reference. This menu will be shown for folders only.

FolderIcon

Icon index. It will be used to display the icons of the extension folders.

FolderOpenIcon

Icon index. It will be used to display the icons of the opened extension folders.

ItemIcon

Icon index. It will be used to display the icons of the extension files.

ItemOpenIcon

Reserveed for future use.

LargeIcons

TSxIconList reference. Use this property to supply 32x32 icons for your namespace extension.

SmallIcons

TSxIconList reference. Use this property to supply 16x16 icons for your namespace extension.

    Set OnClick event handles now for all menu items you need. Add necessary icons into TSxIconList components.

    Save the project and compile it - it is ready now! As well as any other ActiveX library the Shell+ project requires registration. You can register it in several ways:

  • from command prompt using MS regsvr32 utility: regsvr32.exe Project1.dll
  • from command prompt using Borland's tregsvr utility: tregsvr Project1.dll

To know more about shell extension installation please follow the link.

The final step is to test the Namespace extension library. Open the Windows Explorer and enter the folder of your namespace extension. It will look like shown below. Note that the position of the root folder is defined by junction point settings:

Delphi Namespace extension example

    Don't forget to uninstall the example when all tests are finished. Note that it is an example only and it will show its confirmation window until you will not unregister it. As well as installation the uninstallation can be done in many ways:

  • from command prompt using MS regsvr32 utility: regsvr32.exe /u Project1.dll
  • from command prompt using Borland's tregsvr utility: tregsvr -u Project1.dll

The detailed information about extension uninstallation is available here.


1. The only exception is the TSxTrayIcon component that does not need to be placed on SxDataModule instance.
2. This property takes effect on extension re-iregistration.

 


    Use links below to download source codes of this example as well as binary files:

This example demonstrates basic functionality of Shell Namespace Extensions. It uses TsxSimpleTreeProvider component.

Delphi 10.1 Berlin (x64)
NSE-SysShellView-D24X64.zip
1.29Mb
3.15.296.396
11.09.2016
Delphi 10.1 Berlin
NSE-SysShellView-D24.zip
1.02Mb
3.15.296.396
11.09.2016
Delphi 10 Seattle (x64)
NSE-SysShellView-D23X64.zip
1.29Mb
3.15.296.396
11.09.2016
Delphi 10 Seattle
NSE-SysShellView-D23.zip
1.02Mb
3.15.296.396
11.09.2016
Delphi XE8 (x64)
NSE-SysShellView-D22X64.zip
1.29Mb
3.12.289.357
15.05.2015
Delphi XE8
NSE-SysShellView-D22.zip
1.01Mb
3.12.289.357
15.05.2015
Delphi XE7 (x64)
NSE-SysShellView-D21X64.zip
1.29Mb
3.11.289.357
19.09.2014
Delphi XE7
NSE-SysShellView-D21.zip
243.95Kb
3.11.289.357
19.09.2014
Delphi XE6 (x64)
NSE-SysShellView-D20X64.zip
1.30Mb
3.10.287.331
16.09.2014
Delphi XE6
NSE-SysShellView-D20.zip
243.34Kb
3.10.287.331
16.09.2014
Delphi XE5 (x64)
NSE-SysShellView-D19X64.zip
1.25Mb
3.10.287.331
16.03.2014
Delphi XE5
NSE-SysShellView-D19.zip
241.20Kb
3.10.287.331
16.03.2014
Delphi XE4 (x64)
NSE-SysShellView-D18X64.zip
1.24Mb
3.10.287.331
16.03.2014
Delphi XE4
NSE-SysShellView-D18.zip
241.18Kb
3.10.287.331
16.03.2014
Delphi XE3 (x64)
NSE-SysShellView-D17X64.zip
1.22Mb
3.10.287.331
16.03.2014
Delphi XE3
NSE-SysShellView-D17.zip
241.18Kb
3.10.287.331
16.03.2014
Delphi XE2 (x64)
NSE-SysShellView-D16X64.zip
984.29Kb
3.10.287.331
16.03.2014
Delphi XE2
NSE-SysShellView-D16.zip
240.46Kb
3.10.287.331
16.03.2014
Delphi XE
NSE-SysShellView-D15.zip
235.30Kb
3.10.287.331
16.03.2014
Delphi 2010
NSE-SysShellView-D14.zip
234.99Kb
3.10.287.331
16.03.2014
Delphi 2009
NSE-SysShellView-D12.zip
168.17Kb
3.10.287.331
16.03.2014
Delphi 2007
NSE-SysShellView-D11.zip
166.67Kb
3.10.287.331
16.03.2014
Delphi 2006
NSE-SysShellView-D10.zip
166.57Kb
3.10.287.331
16.03.2014
Delphi 2005
NSE-SysShellView-D9.zip
167.45Kb
3.10.287.331
16.03.2014
Delphi 7
NSE-SysShellView-D7.zip
378.88Kb
3.12.289.357
16.05.2015
Delphi 6
NSE-SysShellView-D6.zip
166.69Kb
3.8.287.331
09.05.2012


    Other examples:

    TSxByHandProvider Example:

This example will map the computer drive C: as Shell Namespace Extension.

Delphi 10.1 Berlin (x64)
NSE-ByHandProvider-D24X64.zip
1.30Mb
3.15.296.396
11.09.2016
Delphi 10.1 Berlin
NSE-ByHandProvider-D24.zip
1.03Mb
3.15.296.396
11.09.2016
Delphi 10 Seattle (x64)
NSE-ByHandProvider-D23X64.zip
1.30Mb
3.15.296.396
11.09.2016
Delphi 10 Seattle
NSE-ByHandProvider-D23.zip
1.02Mb
3.15.296.396
11.09.2016
Delphi XE8 (x64)
NSE-ByHandProvider-D22X64.zip
1.30Mb
3.12.289.357
15.05.2015
Delphi XE8
NSE-ByHandProvider-D22.zip
1.02Mb
3.12.289.357
15.05.2015
Delphi XE7 (x64)
NSE-ByHandProvider-D21X64.zip
1.30Mb
3.11.289.357
19.09.2014
Delphi XE7
NSE-ByHandProvider-D21.zip
251.62Kb
3.11.289.357
19.09.2014
Delphi XE6 (x64)
NSE-ByHandProvider-D20X64.zip
1.30Mb
3.10.287.331
16.09.2014
Delphi XE6
NSE-ByHandProvider-D20.zip
251.20Kb
3.10.287.331
16.09.2014
Delphi XE5 (x64)
NSE-ByHandProvider-D19X64.zip
1.26Mb
3.10.287.331
16.03.2014
Delphi XE5
NSE-ByHandProvider-D19.zip
249.21Kb
3.10.287.331
16.03.2014
Delphi XE4 (x64)
NSE-ByHandProvider-D18X64.zip
1.25Mb
3.10.287.331
16.03.2014
Delphi XE4
NSE-ByHandProvider-D18.zip
249.03Kb
3.10.287.331
16.03.2014
Delphi XE3 (x64)
NSE-ByHandProvider-D17X64.zip
1.23Mb
3.10.287.331
16.03.2014
Delphi XE3
NSE-ByHandProvider-D17.zip
248.98Kb
3.10.287.331
16.03.2014
Delphi XE2 (x64)
NSE-ByHandProvider-D16X64.zip
991.83Kb
3.10.287.331
16.03.2014
Delphi XE2
NSE-ByHandProvider-D16.zip
248.19Kb
3.10.287.331
16.03.2014
Delphi XE
NSE-ByHandProvider-D15.zip
242.98Kb
3.10.287.331
16.03.2014
Delphi 2010
NSE-ByHandProvider-D14.zip
243.30Kb
3.10.287.331
16.03.2014
Delphi 2009
NSE-ByHandProvider-D12.zip
177.11Kb
3.10.287.331
16.03.2014
Delphi 2007
NSE-ByHandProvider-D11.zip
175.36Kb
3.10.287.331
16.03.2014
Delphi 2006
NSE-ByHandProvider-D10.zip
175.29Kb
3.10.287.331
16.03.2014
Delphi 2005
NSE-ByHandProvider-D9.zip
176.71Kb
3.10.287.331
16.03.2014
Delphi 7
NSE-ByHandProvider-D7.zip
387.85Kb
3.12.289.357
16.05.2015
Delphi 6
NSE-ByHandProvider-D6.zip
175.64Kb
3.8.287.331
09.05.2012

 

    TSxShellFormView Example:

This example demonstrates how to implement custom shell views for Shell Namespace Extensions.

Delphi 10.1 Berlin (x64)
NSE-ShellViewForm-D24X64.zip
1.41Mb
3.15.296.396
11.09.2016
Delphi 10.1 Berlin
NSE-ShellViewForm-D24.zip
1.09Mb
3.15.296.396
11.09.2016
Delphi 10 Seattle (x64)
NSE-ShellViewForm-D23X64.zip
1.41Mb
3.15.296.396
11.09.2016
Delphi 10 Seattle
NSE-ShellViewForm-D23.zip
1.08Mb
3.15.296.396
11.09.2016
Delphi XE8 (x64)
NSE-ShellViewForm-D22X64.zip
1.41Mb
3.12.289.357
15.05.2015
Delphi XE8
NSE-ShellViewForm-D22.zip
1.08Mb
3.12.289.357
15.05.2015
Delphi XE7 (x64)
NSE-ShellViewForm-D21X64.zip
1.41Mb
3.11.289.357
19.09.2014
Delphi XE7
NSE-ShellViewForm-D21.zip
247.67Kb
3.11.289.357
19.09.2014
Delphi XE6 (x64)
NSE-ShellViewForm-D20X64.zip
1.42Mb
3.10.287.331
16.09.2014
Delphi XE6
NSE-ShellViewForm-D20.zip
247.28Kb
3.10.287.331
16.09.2014
Delphi XE5 (x64)
NSE-ShellViewForm-D19X64.zip
1.37Mb
3.10.287.331
16.03.2014
Delphi XE5
NSE-ShellViewForm-D19.zip
245.10Kb
3.10.287.331
16.03.2014
Delphi XE4 (x64)
NSE-ShellViewForm-D18X64.zip
1.37Mb
3.10.287.331
16.03.2014
Delphi XE4
NSE-ShellViewForm-D18.zip
245.04Kb
3.10.287.331
16.03.2014
Delphi XE3 (x64)
NSE-ShellViewForm-D17X64.zip
1.35Mb
3.10.287.331
16.03.2014
Delphi XE3
NSE-ShellViewForm-D17.zip
244.99Kb
3.10.287.331
16.03.2014
Delphi XE2 (x64)
NSE-ShellViewForm-D16X64.zip
1.08Mb
3.10.287.331
16.03.2014
Delphi XE2
NSE-ShellViewForm-D16.zip
244.45Kb
3.10.287.331
16.03.2014
Delphi XE
NSE-ShellViewForm-D15.zip
239.81Kb
3.10.287.331
16.03.2014
Delphi 2010
NSE-ShellViewForm-D14.zip
239.01Kb
3.10.287.331
16.03.2014
Delphi 2009
NSE-ShellViewForm-D12.zip
172.38Kb
3.10.287.331
16.03.2014
Delphi 2007
NSE-ShellViewForm-D11.zip
171.18Kb
3.10.287.331
16.03.2014
Delphi 2006
NSE-ShellViewForm-D10.zip
171.13Kb
3.10.287.331
16.03.2014
Delphi 2005
NSE-ShellViewForm-D9.zip
172.19Kb
3.10.287.331
16.03.2014
Delphi 7
NSE-ShellViewForm-D7.zip
429.85Kb
3.12.289.357
16.05.2015
Delphi 6
NSE-ShellViewForm-D6.zip
174.85Kb
3.8.287.331
09.05.2012

Shell+ Fish Fact demo

This advanced example demonstrates how to combine custom view mode and system-defined view modes. Read more...

ExBioLife-D21.zip
b
Delphi XE6
ExBioLife-D20.zip
499.10Kb
3.10.287.331
16.09.2014
Delphi XE5
ExBioLife-D19.zip
497.08Kb
3.10.287.331
16.03.2014
Delphi XE4
ExBioLife-D18.zip
497.25Kb
3.10.287.331
16.03.2014
Delphi XE3
ExBioLife-D17.zip
488.65Kb
3.10.287.331
16.03.2014
Delphi XE2
ExBioLife-D16.zip
450.54Kb
3.10.287.331
16.03.2014
Delphi XE
ExBioLife-D15.zip
445.03Kb
3.10.287.331
16.03.2014
Delphi 2010
ExBioLife-D14.zip
444.87Kb
3.10.287.331
16.03.2014
Delphi 2009
ExBioLife-D12.zip
331.90Kb
3.10.287.331
16.03.2014
Delphi 2007
ExBioLife-D11.zip
325.08Kb
3.10.287.331
16.03.2014
Delphi 2006
ExBioLife-D10.zip
324.37Kb
3.10.287.331
16.03.2014
Delphi 2005
ExBioLife-D9.zip
320.57Kb
3.10.287.331
16.03.2014
Delphi 7
ExBioLife-D7.zip
317.99Kb
3.11.289.357
19.09.2014
Delphi 6
ExBioLife-D6.zip
317.27Kb
3.8.287.331
09.05.2012

Shell+ MegaDemo example

This example demonstrates basic and advanced functonality for Shell Namespace Extension. The NSE works with external executable server via COM interface. Read more...

Delphi XE7 (x64)
NSE-MegaDemo-D21X64.zip
1.52Mb
3.11.289.357
19.09.2014
Delphi XE7
NSE-MegaDemo-D21.zip
335.55Kb
3.11.289.357
19.09.2014
Delphi XE6 (x64)
NSE-MegaDemo-D20X64.zip
1.53Mb
3.10.287.331
16.09.2014
Delphi XE6
NSE-MegaDemo-D20.zip
335.09Kb
3.10.287.331
16.09.2014
Delphi XE5 (x64)
NSE-MegaDemo-D19X64.zip
1.48Mb
3.10.287.331
16.03.2014
Delphi XE5
NSE-MegaDemo-D19.zip
332.81Kb
3.10.287.331
16.03.2014
Delphi XE4 (x64)
NSE-MegaDemo-D18X64.zip
1.47Mb
3.10.287.331
16.03.2014
Delphi XE4
NSE-MegaDemo-D18.zip
332.73Kb
3.10.287.331
16.03.2014
Delphi XE3 (x64)
NSE-MegaDemo-D17X64.zip
1.45Mb
3.10.287.331
16.03.2014
Delphi XE3
NSE-MegaDemo-D17.zip
332.51Kb
3.10.287.331
16.03.2014
Delphi XE2 (x64)
NSE-MegaDemo-D16X64.zip
1.19Mb
3.10.287.331
16.03.2014
Delphi XE2
NSE-MegaDemo-D16.zip
331.55Kb
3.10.287.331
16.03.2014
Delphi XE
NSE-MegaDemo-D15.zip
323.74Kb
3.10.287.331
16.03.2014
Delphi 2010
NSE-MegaDemo-D14.zip
323.36Kb
3.10.287.331
16.03.2014
Delphi 2009
NSE-MegaDemo-D12.zip
249.12Kb
3.10.287.331
16.03.2014
Delphi 2007
NSE-MegaDemo-D11.zip
247.36Kb
3.10.287.331
16.03.2014
Delphi 2006
NSE-MegaDemo-D10.zip
246.99Kb
3.10.287.331
16.03.2014
Delphi 2005
NSE-MegaDemo-D9.zip
249.42Kb
3.10.287.331
16.03.2014
Delphi 7
NSE-MegaDemo-D7.zip
249.72Kb
3.11.289.357
21.09.2014
Delphi 6
NSE-MegaDemo-D6.zip
251.35Kb
3.8.287.331
09.05.2012


  Top


Components | Download | Purchase | Support | About Us
Copyright © 2016 ALDYN Software. All rights reserved.
Copyright © 2001 - 2011 Shell+ Development Group. All rights reserved.