Referat Unit demonstrativ pentru int 33h - lucrul cu mouse



Referat downloadat de: 124 ori.


Cauta referat dupa: unit demonstrativ pentru lucrul mouse


Descriere referat:

{Maxim Vicentiu . } {Unit demonstrativ pentru int 33h - lucrul cu mouse} UNIT maxmouse; INTERFACE Function MouseStatus: boolean; Procedure MSetDomain(x,y : word); Procedure Show; Procedure Hide; Procedure MPos(var x,y : word); Function LPressed: boolean; Function RPressed: boolean; Function LRelease: boolean; Function RRelease: boolean; Function LClick: boolean; Function RClick: boolean; Function MouseMoved(x, y : word): boolean; IMPLEMENTATION Uses crt, dos; Function MouseStatus; var r : registers; begin r.ax := $0000; intr($33, r);{reset driver and read status} if r.ax = 0 then MouseStatus := False else MouseStatus := True; end; Procedure MSetDomain; var r : registers; begin r.ax := $0007; r.cx := 0; r.dx := x; intr($33, r); r.ax := $0008; r.cx := 0; r.dx := y; intr($33, r) end; Procedure Show; var r : registers; begin r.ax := $0001; intr($33, r) end; Procedure Hide; var r : registers; begin r.ax := $0002; intr($33, r) end; Procedure MPos(var x,y : word); var r : registers; begin r.ax := $0003; intr($33, r); x := r.cx;{coloana} y := r.dx end; Function LPressed; var r : registers; begin r.ax := $0005; r.bx := $0000; intr($33, r); r.ax := r.ax and $0001; if r.ax=1 then LPressed := True else LPressed := False end; Function RPressed; var r : registers; begin r.ax := $0005; r.bx := $0001; intr($33, r); r.ax := r.ax and $0002; if r.ax=2 then RPressed := True else RPressed := False end; Function LRelease; var r: registers; begin r.ax := $0006; r.bx := $0000; intr($33, r); r.ax := r.ax and $0001; if r.ax=1 then LRelease := False else LRelease := True end; Function RRelease; var r: registers; begin r.ax := $0006; r.bx := $0001; intr($33, r); r.ax := r.ax and $0002; if r.ax=2 then RRelease := True else RRelease := False end; Function LClick; begin LClick := False; if LPressed then begin delay(15); if LRelease then LClick := True end end; Function RClick; begin RClick := False; if RPressed then begin delay(15); if RRelease then RClick := True end end; Function MouseMoved; var r : registers; begin r.ax := $0003; intr($33, r); if ((r.cx<>x) or (r.dx<>y)) then MouseMoved := TRUE else MouseMoved := False end; end.

Alte referate din materia: Informatica

Nr. Nume referat Hits
1 mtSZPKbW 20
2 TkkvMlabSupl 51
3 qzpymq@dxuzju.com 148
4 email@gmail.com 269
5 pfuqxd@exjswl.com 288
6 ncqcez@hdtnnq.com 244
7 Hard 722
8 ISTORIA INTERNET-ULUI 782
9 Impera 469
10 Info Doc 524
11 Info-TIRON 467
12 Informatica - Grafica pentru web 938
13 Informatica - Introducere in HTML 711
14 Initiere in pc 701
15 Instalarea sistemului de operare Windows 593
16 Internetul ca sursa de comunicare 580
17 Istoria Internetului 617
18 Istoria calculatorului 539
19 Istoria metodelor de proiectare 359
20 Java visavis de C++ 401
21 Java vizavi de C 333
22 LIMBAJUL DE PROGRAMARE PASCAL - Programul defineste tipul salariat, o inregistrare cu variante, valorile citite fiind salvate in fisierul salariat.dat 0
23 Limbajul C 413
24 Lista vinuri prg 322
25 Lotus software 293
Trimite un referat !
Referatul tau ii poate ajuta si pe ceilalti! Ajuta-ti colegii!

Ai un referat facut de tine si consideri ca este bun si original ? Trimite-ti lucrarea ta si poti castiga premii, ajutandu-ti colegii sa ia note bune!

Trimite un referat!
Cere un
referat !
Ai nevoie de un referat bun si nu il gasesti ?

Noi te ajutam sa iti faci referatul de care ai nevoie. Da-ne detalii despre lucrarea pe care trebuie sa o redactezi si noi vom scotoci pentru tine!

Cere un referat!