The joySetCature function captures a joystick by causing its messages to be sent to the specified window.
Returns JOYERR_NOERROR if successful or one of the following error values.
MMSYSERR_NODRIVER - The joystick driver is not present. MMSYSERR_INVALPARAM - Windows 95/98/Me: Invalid joystick ID or hwnd is NULL. JOYERR_NOCANDO - Cannot capture joystick input because a required service (such as a Windows timer) is unavailable. JOYERR_UNPLUGGED - The specified joystick is not connected to the system. JOYERR_PARMS - Windows NT/2000/XP: Invalid joystick ID or hwnd is NULL.
This function fails if the specified joystick is currently captured. Call the joyReleaseCapture function to release the captured joystick, or destroy the window to release the joystick automatically.
Winmm Class | Tao.Platform.Windows Namespace