1
{example for GetLastButtonPress and GetLastButtonRelease}
5
Var x, y, times: Longint;
13
Writeln('Move the mouse and click the buttons (press escape to quit).');
14
Writeln('Press the L-key to see the stats for the left button.');
15
Writeln('Press the R-key to see the stats for the right button.');
16
Writeln('Press the M-key to see the stats for the middle button.');
18
Write('Since the last call to GetLastButtonPress with this button as parameter, the');
20
Write('Since the last call to GetLastButtonRelease with this button as parameter, the');
30
times := GetLastButtonPress(LButton, x, y);
31
Write('left button has been pressed ',times,
32
' times, the last time at (',x,',',y,')');
33
times := GetLastButtonRelease(LButton, x, y);
36
Write('left button has been released ',times,
37
' times, the last time at (',x,',',y,')')
43
times := GetLastButtonPress(RButton, x, y);
44
Writeln('right button has been pressed ',times,
45
' times, the last time at (',x,',',y,')');
46
times := GetLastButtonRelease(RButton, x, y);
49
Write('right button has been released ',times,
50
' times, the last time at (',x,',',y,')')
56
times := GetLastButtonPress(MButton, x, y);
57
Writeln('middle button has been pressed ',times,
58
' times, the last time at (',x,',',y,')');
59
times := GetLastButtonRelease(MButton, x, y);
62
Write('middle button has been released ',times,
63
' times, the last time at (',x,',',y,')')
67
Until (c = #27); {escape}
68
While KeyPressed do ReadKey;