Home   Index   About
Ultimate Pack


Custom Search
Part Types

The following policy part types are defined:

CHECKBOX
Displays a check box. The value is set in the registry with the REG_DWORD type. The value will be nonzero if the check box is checked by the user and zero if it is unchecked.
COMBOBOX
Displays a combo box.
DROPDOWNLIST
Displays a combo box with a drop-down list style. The user may only choose from one of the entries supplied. The main advantage of a combo box with a drop-down list is that a number of extra registry edits may be specified, based on the user's selection.
EDITTEXT
Displays an edit field that accepts alphanumeric text. The text is set in the registry with the REG_SZ type.
LISTBOX
Displays a list box with "add" and "remove" buttons. This is the only part type that can be used to manage multiple values under one key.
NUMERIC
Displays an edit field with an optional spinner control (an up-down control) that accepts a numeric value. The value is set in the registry with the REG_DWORD type.
TEXT
Displays a line of static (label) text. There is no associated registry value with this part type.

Descriptions of these policy part types follow.

CHECKBOX Part Type

The CHECKBOX part type accepts the following options:

ACTIONLISTOFF
Specifies an optional action list to be used if the check box is turned off. For more information, see "Action Lists" later in this topic.
ACTIONLISTON
Specifies an optional action list to be used if the check box is turned on. For more information, see "Action Lists" later in this topic.
DEFCHECKED
Causes the check box to be initially checked.
VALUEOFF
Overrides the default "off" behavior of the check box if specified.
VALUEON
Overrides the default "on" behavior of the check box if specified.

The default behavior of a check box is to write the value 1 to the registry if it is checked and 0 if it is unchecked. VALUEON and VALUEOFF are used to override this behavior. For example, the following option writes "Fred" to the registry when the check box is checked.

VALUEON "Fred"

The following option writes the value 12 to the registry when the check box is unchecked.

VALUEOFF NUMERIC 12

COMBOBOX Part Type

The COMBOBOX part type accepts all the options that EDITTEXT does as well as the following option:

SUGGESTIONS
Begins a list of suggestions to be placed in the drop-down list. Suggestions are separated with spaces and can be enclosed by double quotation marks. The list ends with END SUGGESTIONS. Following is an example:

SUGGESTIONS
Alaska Alabama Mississippi "New York"
END SUGGESTIONS

DROPDOWNLIST Part Type

The DROPDOWNLIST part type accepts the following options:

ITEMLIST
Begins a list of the items in the drop-down list. The list must end with END ITEMLIST.
REQUIRED
Specifies that the policy editor will not allow a policy containing this part to be enabled unless a value has been entered for the part.

Each item in the ITEMLIST option must be specified as follows.

NAME name VALUE value
[ACTIONLIST actionlist]
...

name

Text to be displayed in the drop-down list for this item.

  • alue

Value to be written as the part's value if this item is selected. Values are assumed to be strings, unless they are preceded by NUMERIC. The following example shows both string and numeric values.

VALUE "Some value"

VALUE NUMERIC 1

If VALUE is followed by DELETE (for example, VALUE DELETE), the registry valuename and value pair will be deleted.

actionlist

Optional action list to be used if this value is selected. For more information about action lists, see "Action Lists" later in this topic.

EDITTEXT Part Type

The EDITTEXT part type accepts the following options:

DEFAULT value
Specifies the initial string to place in the edit field. If this option is not specified, the field is initially empty.
MAXLEN value
Specifies the maximum length of a string. The string in the edit field is limited to this length.
REQUIRED
Specifies that the policy editor will not allow a policy containing this part to be enabled, unless a value has been entered for this part.
OEMCONVERT
Sets the ES_OEMCONVERT style in the edit field so that typed text is mapped from ANSI to OEM and back.

LISTBOX Part Type

The VALUENAME option cannot be used with the LISTBOX part type, because there is no single value name associated with this type. By default, only one column appears in the list box, and for each entry a value is created whose name and value are the same. For instance, a "fred" entry in the list box would create a value named "fred" whose data was "fred".

The LISTBOX part type accepts the following options:

ADDITIVE
By default, the content of list boxes will "override" whatever values are set in the target registry. (That is, a control value is inserted in the policy file, which causes existing values to be deleted before the values set in the policy file are merged.) If this option is specified, existing values are not deleted, and the values set in the list box will be in addition to whatever values exist in the target registry.
EXPLICITVALUE
This option makes the user specify not only the value data, but the value name as well. The list box will show two columns for each item, one for the name and one for the data. This option cannot be used with the VALUEPREFIX option.
VALUEPREFIX prefix
The prefix specified is used in determining value names. If a prefix is specified, the prefix and an incremented integer will be used instead of the default value naming scheme described previously. For example, a prefix of "SomeName" will generate the value names "SomeName1", "SomeName2", and so on. The prefix can be empty (""), which will cause the value names to be "1", "2", and so on.

NUMERIC Part Type

The NUMERIC part type accepts the following options:

DEFAULT value
Specifies the initial numeric value for the edit field. If this option is not specified, the field is initially empty.
MAX value
Specifies the maximum value for the number. The default value is 9999.
MIN value
Specifies the minimum value for the number. The default value is 0.
REQUIRED
Specifies that the policy editor will not allow a policy containing this part to be enabled unless a value has been entered for this part.
SPIN value
Specifies increments to use for the spinner control. SPIN 0 removes the spinner control. SPIN 1 is the default.
TXTCONVERT
Writes values as REG_SZ strings ("1," "2," or "128") rather than as binary values.

TEXT Part Type

The TEXT part type accepts no type-specific data.


Last news from Greatis Software

Nostalgia .Net     Nostalgia .Net     .Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes.  More »

Recommended software for developers

Ultimate Pack for Delphi and C++ Builder     Ultimate Pack     Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price.  More »

Form Designer .Net     Form Designer .Net     Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro!  More »

Print Suite .Net     Print Suite .Net     Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available  More »

Gradient Controls .Net     Gradient Controls .Net     Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available  More »

iGrid     Greatis iGrid     iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors.  More »


All the contacts and projects

Dmitry Vasiliev (just.dmitry)

Related Links

Software for Visual Studio .NET developers
Software for Delphi and C++ Builder developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference
Win32 Multimedia Programmer's Reference
OLE Programmer's Reference
Microsoft Windows Pen API Programmer's Reference
Microsoft Windows Sockets 2 Reference
Microsoft Windows Telephony API (TAPI) Programmer's Reference
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008-2012 Free Tech Secrets ;) greatis just4fun network just4fun