DesignerFeatures Key

The DesignerFeatures key lists features for which the designer requires or prefers host support at design time.

Registry Entry

HKEY_CLASSES_ROOT\CLSID\DesignerClsid\DesignerFeatures
   Required
RequiredFlags
   Optional
OptionalFlags

Value Entries

RequiredFlags

A DWORD value that specifies one or more required designer feature flags.

OptionalFlags

A DWORD value that specifies one or more optional designer feature flags.

Comments

The RequiredFlags value specifies features that the host must support for the designer to operate correctly. A designer that specifies one or more required flags should also register CATID_DesignerFeatures under \HKEY_CLASSES_ROOT\CLSID\DesignerClsid\RequiredCategories to indicate that designer features are required.

A host that supports any of these features will check to ensure that it supports the specific required features. Visual Basic 6.0 performs this check when the user attempts to add a designer to the project.

The OptionalFlags value specifies features for which host support is preferable but  not required.

RequiredFlags and OptionalFlags are the result of bitwise OR operations on flags from the following list:

DESIGNERFEATURE_CANBEPUBLIC

Allows the designer to be exposed programmatically outside the host's name space. Specifying this flag does not guarantee that the designer will be publicly exposed. To ensure that the designer is exposed, use DESIGNERFEATURE_MUSTBEPUBLIC also.

If the host does not expose the designer, it can be used only within the host's name space.

To allow the designer to be created outside the host, use DESIGNERFEATURE_CANCREATE. Using DESIGNERFEATURE_CANBEPUBLIC without DESIGNERFEATURE_CANCREATE is equivalent to setting the Instancing property to PublicNotCreatable for a Visual Basic class module.

DESIGNERFEATURE_CANCREATE

Allows the designer to be created outside the host's name space. Run-time objects derived from designers that specify this flag will appear in the registry and type library.

Specifying this flag is analogous to specifying TYPEFLAG_FCANCREATE when defining type information.

Specifying both DESIGNERFEATURE_CANCREATE and DESIGNERFEATURE_CANBEPUBLIC is equivalent to setting the Instancing property to MultiUse for a Visual Basic class module.

DESIGNERFEATURE_DELAYEVENTSINKING

Requests that the host delay connecting event sources and sinks until the run-time designer calls IActiveDesignerRuntimeSite::GetAdviseSink. If the designer does not specify this flag, the host connects event sources and sinks when it creates the run-time instance. Delaying the event connections can improve performance.

DESIGNERFEATURE_DONTSITE

Requests that the host does not site the designer at run time. Specify this flag if the designer will be hosted in a second host and should be sited there instead. This flag requires the concurrent use of the DESIGNERFEATURE_CANBEPUBLIC flag.

By default, the host sites designers that are invisible at run time.

DESIGNERFEATURE_INPROCONLY

Indicates that the designer can be used only when the public class is an in-process server. Designers that specify this flag cannot be used with external processes that involve cross-thread, cross-process, or cross-machine marshaling. The designer can be added to a project that produces a dynamic-link library (DLL). If the designer does not specify the DESIGNERFEATURE_MUSTBEPUBLIC flag, the designer can also be used in an EXE project, but it cannot be public. Hosts are responsible for enforcing these restrictions.

DESIGNERFEATURE_MUSTBEPUBLIC

Requires that the designer be exposed programmatically outside the host's name space to be useful to a user. This flag requires the concurrent use of the DESIGNERFEATURE_CANBEPUBLIC flag. If the designer specifies DESIGNERFEATURE_MUSTBEPUBLIC but for some reason the designer cannot be made public, the host disables use of the designer.

Designers that need to register additional objects beyond the defaults must set both DESIGNERFEATURE_MUSTBEPUBLIC and DESIGNERFEATURE_REGISTRATION.

DESIGNERFEATURE_NOTIFYBEFORERUN

Requests that the host notify the designer before the IDE enters run mode.

Designers that specify this flag must implement IDesignerDebugging::BeforeRun.

DESIGNERFEATURE_NOTIFYAFTERRUN

Requests that the host notify the designer after the IDE exits run mode.

Designers that specify this flag must implement IDesignerDebugging::AfterRun.

DESIGNERFEATURE_PREDECLAREDID

Requests a predeclared identifier for the designer. A predeclared identifier gives the user a default instance of the designer to work with. The host does not create a default instance unless the registry specifies this value.

DESIGNERFEATURE_REGISTRATION

Indicates that the run-time designer DLL implements DllRegisterDesigner and DllUnregisterDesigner to register custom information about an authored public class.

Designers that implement the optional IDesignerRegistration interface must set this flag; the host queries for this interface only if the flag is set. Furthermore, designers with custom registration requirements must be public; that is, they must set DESIGNERFEATURE_MUSTBEPUBLIC.

DESIGNERFEATURE_STARTUPINFO

Indicates that the designer implements IDesignerDebugging::GetStartupInfo, which specifies a URL or executable program to invoke when the IDE enters run mode. Typically, starting the specified program or launching the browser and navigating to the given URL causes a run-time instance of the designer to be created.

See Also

DllRegisterDesigner, DllUnregisterDesigner, IActiveDesignerRuntimeSite, IActiveDesignerRuntime, IDesignerDebugging, IDesignerRegistration