Share via


_Application::UserControl property

The UserControl property sets or retrieves the user control property for the application. This property determines whether the user has control of the MMC application. This property is read/write.

Syntax

Property UserControl As Long

Property value

A value that specifies whether the user has control of the MMC application.

Remarks

If the UserControl property is 1, then when the script (or using application) terminates without ending the MMC application, the MMC application remains active for the user. Additionally, if the UserControl property is 1, then the MMC application cannot be hidden (Application.Hide will fail). The UserControl property default value is 0; a value of 0 results in the MMC application terminating when the script or using application terminates.

If the MMC application is hidden and the UserControl property is changed from 0 to 1, then the MMC application will be shown.

Examples

' Retrieve the UserControl property.
Dim lUserCtrl As Long
lUserCtrl = objMMC.UserControl
' Use the value.
MsgBox ("UserControl = " & lUserCtrl)

' Set the UserControl property.
objMMC.UserControl = 1

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
MMCObj.h
IDL
MMCObj.idl
DLL
Mmc.exe
CLSID
CLSID_Application is defined as 49B2791A-B1AE-4C90-9B8E-E860BA07F889
IID
IID__Application is defined as A3AFB9CC-B653-4741-86AB-F0470EC1384C

See also

Application.Hide

Application.Show

Application.Visible

Controlling the Lifetime of an MMC Instance