Microsoft DirectX 8.1 (Visual Basic)

CONST_DISCLFLAGS

The CONST_DISCLFLAGS enumeration is used in the flags parameter of the DirectInputDevice8.SetCooperativeLevel method to determine how the device interacts with other instances of the device and the rest of the system.

Enum CONST_DISCLFLAGS
    DISCL_BACKGROUND   =  8
    DISCL_EXCLUSIVE    =  1
    DISCL_FOREGROUND   =  4
    DISCL_NONEXCLUSIVE =  2
    DISCL_NOWINKEY     = 16 (&H10)
End Enum

Constants

DISCL_BACKGROUND
The application requires background access. If background access is granted, the device may be acquired at any time, even when the associated window is not the active window.
DISCL_EXCLUSIVE
The application requires exclusive access. If exclusive access is granted, no other instance of the device may obtain exclusive access to the device while it is acquired. Note, however, non-exclusive access to the device is always permitted, even if another application has obtained exclusive access.

If an application acquires the mouse or keyboard device in exclusive mode, the user will not be able to use the window menu or move and resize the window.

DISCL_FOREGROUND
The application requires foreground access. If foreground access is granted, the device is automatically unacquired when the associated window moves to the background.
DISCL_NONEXCLUSIVE
The application requires non-exclusive access. Access to the device will not interfere with other applications that are accessing the same device.
DISCL_NOWINKEY
The Microsoft® Windows® logo key is disabled so that users cannot inadvertently break out of the application. This value can be combined with DISCL_NONEXCLUSIVE. In exclusive mode, the Windows logo key is always disabled. Note, however, that DISCL_NOWINKEY has no effect when the default action mapping UI is displayed, and the Windows logo key operates normally as long as that UI is present.

Applications must specify either DISCL_FOREGROUND or DISCL_BACKGROUND; it is an error to specify both or neither. Similarly, applications must specify either DISCL_EXCLUSIVE or DISCL_NONEXCLUSIVE.