~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to docs/mouseex/mouse6.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2001-08-29 23:15:17 UTC
  • Revision ID: james.westby@ubuntu.com-20010829231517-thxsp7ctuab584ia
Tags: upstream-1.0.4
ImportĀ upstreamĀ versionĀ 1.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{example for SetMouseXRange, SetMouseYRange and SetMouseWindow}
 
2
 
 
3
Uses MsMouse, Crt;
 
4
 
 
5
Begin
 
6
  If MouseFound Then
 
7
    Begin
 
8
      SetMouseXRange(20*8,50*8);  {charracter width and height = 8 pixels}
 
9
      SetMouseYRange(10*8,15*8);
 
10
 
 
11
{the two lines of code have exactly the same effect as
 
12
 SetMouseWindow(20*8,10*8,50*8,15*8)}
 
13
 
 
14
      Writeln('Press any key to quit.');
 
15
      ShowMouse;
 
16
      While KeyPressed Do ReadKey;
 
17
      Readkey;
 
18
      While KeyPressed Do ReadKey;
 
19
      HideMouse
 
20
    End
 
21
End.
 
22