# UserMode
{: .no_toc }

Returns whether the control is running inside an application (**True**) or being edited inside a designer (**False**), as a **Boolean**. Read-only.

Syntax: *object*.**UserMode**

*object*
: *required* An object expression that evaluates to an **AmbientProperties** object.

This is the most-checked ambient property. A control should consult **UserMode** before doing anything that only makes sense at run time --- connecting to a database, starting a timer, animating its own appearance --- because at design time the host is showing a static representation of the control on a layout surface. When **UserMode** is **False**, the control should also be willing to draw selection adornments such as [**ShowGrabHandles**](/tB/Packages/VBRUN/AmbientProperties/ShowGrabHandles.md) and [**ShowHatching**](/tB/Packages/VBRUN/AmbientProperties/ShowHatching.md) on request.

### Example

This example responds to a **UserMode** change and enables the animation timer only at runtime.

```tb check_build
Private Sub UserControl_AmbientChanged(PropertyName As String)
    Select Case PropertyName
        Case "UserMode"
            tmrAnimate.Enabled = Ambient.UserMode    ' run timer only in user mode
    End Select
End Sub
```

### See Also

- [UIDead](/tB/Packages/VBRUN/AmbientProperties/UIDead.md) property
- [ShowGrabHandles](/tB/Packages/VBRUN/AmbientProperties/ShowGrabHandles.md) property
- [ShowHatching](/tB/Packages/VBRUN/AmbientProperties/ShowHatching.md) property
- [DisplayAsDefault](/tB/Packages/VBRUN/AmbientProperties/DisplayAsDefault.md) property
