Function GetLastButtonRelease (Button: Longint; Var x,y:Longint) : Longint;
GetLastButtonRelease stores the position where Button was last released in x and y and returns the number of times this button has been released since the last call to this function with Button as parameter. For button you can use the LButton, RButton and MButton constants for resp. the left, right and middle button.
For two-button mice, checking the stats of the middle button seems to give and clear the stats of the right button.
None.
For an example, see GetLastButtonPress.