uidefault

Description

Indicates that the type information member is the default member for display in the user interface.

Allowed on

A member of an interface or dispinterface.

Comments

This attribute is used to mark an event as the default (the first one created) or a property as the default (the one to select first in the properties browser).

For example, Visual Basic uses this attribute in the following ways:

Flags

FUNCFLAG_FUIDEFAULT

VARFLAG_FUIDEFAULT

Example

[    odl, 
    dual,
    uuid(1e196b20-1f3c-1069-996b-00dd010ef676),
    restricted
]
interface IForm: IDispatch
{
    [propget]
    HRESULT Backcolor([out, retval] long *Value);

    [propput]
    HRESULT Backcolor([in] long Value);


    [propget, uidefault]
    HRESULT Name([out, retval] BSTR *Value);

    [propput, uidefault]
    HRESULT Name([in] BSTR Value);
}

[    odl, 
    dual,
    uuid(1e196b20-1f3c-1069-996b-00dd010ef767),
    restricted
]
interface IFormEvents: IDispatch
{
   [uidefault]
    HRESULT Click();

    HRESULT Resize();
}

[uuid(1e196b20-1f3c-1069-996b-00dd010fe676)]
coclass Form
{
    [default] interface IForm;
    [default, source] interface IFormEvents;
}