Visual Basic Reference

Visual Studio 6.0

DisplayAsDefault Property

See Also    Example    Applies To

Returns a boolean value to determine if the control is the default button for the container, and therefore should display itself as the default control.



The DisplayAsDefault property syntax has this part:

Part Description
object An object expression that evaluates to an object in the Applies To list.


The possible boolean return values from the DisplayAsDefault property are:

Setting Description
True The control is the default button.
False The control is not the default button. If the container does not implement this ambient property, this will be the default value.


Only one control in a container may be the default control; the container of the control will determine which control is currently the default control and notify that control through the DisplayAsDefault ambient property. The notified control should draw itself to show it is the default control. All other controls will have their DisplayAsDefault ambient property value be False.

Only button type controls may be default controls.