Microsoft DirectX 8.1 (Visual Basic) |
To set up the mouse device for data retrieval, first call the DirectInputDevice8.SetCommonDataFormat method with DIFORMAT_MOUSE as the parameter value.
For maximum performance in a full-screen application, set the cooperative level to DISCL_EXCLUSIVE Or DISCL_FOREGROUND. Note that the exclusive setting causes the Microsoft® Windows® cursor to disappear. The DISCL_FOREGROUND setting causes the application to lose access to the mouse when you switch to the Microsoft Visual Basic® development environment. Changing to DISCL_BACKGROUND enables you to debug the application more easily, but at a cost in performance.
The following sections give more information about retrieval and interpretation of immediate and buffered mouse data: