|
|||
|
|||
|
|
Some Control Panel dialogs can be enhanced with a new property sheets. These dialogs are: Internet Settings, System Settings, Power Options, Keyboard Settings, Mouse Settings, Display Adapter Settings and Desktop Settings. Shell+ allows you to use this Shell feature. Below you will find an example how to do it. The Control Panel PropertySheet handler is an ActiveX library like all other Shell Extensions. The first step to be done 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.
Save the created project.
You can save your project now.
Table below shows essential properties of the TSxPropSheetExt component.
Table 1. TSxPropSheetExt properties.
Fig 2. Control Panel extension path. Set component properties as shown below to continue:
Now add the property page form. This form will be shown as a part of Control Panel applet dialog. Open the Repository dialog with File | New | Other... and select the Shell Extensions page:
Click the Property Sheet Form icon and the new PropertySheet form will be created. You can add VCL controls to it now or you can do it later. There is one more step to be done: the form should be attached to the PropertySheet component that was created earlier. This component has a PropertySheets property. Edit it. It looks like shown below:
Use the Add button to show the list of all available property sheet forms. Currently there should be only one because you've added one form only. Select it and it will be added to the list of property sheets. Press خت to save changes. There are two opportunities: it is possible either add a new property sheets or replace the existing with a new one. Use the OnAddPropSheet and OnReplacePropSheet to control the behavior of the extension. The example below adds a new property sheet only, no other property sheets are replaced. Create the OnReplacePropertySheet event handler and add the following code to it:
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:
To know more about shell extension installation please follow the link. Now the example is ready for tests. Right click the desktop and select Properties menu item, you should see something like this:
By handling OnShellExtInitEx event you can get access for initialization information. For details about implementing Property Pages for Display Drivers, please refer to MSDN article. 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:
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. Use links below to download source codes of this example as well as binary files:
|
Components
| Download | Purchase
| Support | About
Us
Copyright © 2016 ALDYN Software. All rights reserved. Copyright © 2001 - 2011 Shell+ Development Group. All rights reserved. |