Turbo Pascalda Mouse Göstermek
-
Turbo Pascal dos ortamlı mouse yok bişi yok diye kafanıza takıyorsanız tam size göre bir program
bu programla TP de mouse kullanabiliyorsunuz.Fazla uzatmadan kodlara geçelim.
{-- Reges Tarafından Yazılmıştır --}
uses crt,graph,dos;
var
gd,gm:integer ;
mButton,mX,mY:integer;
mXFirst,mYFirst,mXc,mYc:integer;
tools:byte;
cik:boolean;
s,s1,s2,s3:string;
procedure mouseon;assembler;
asm
mov ax,1
int 33h
end;
procedure mouseoff;assembler;
asm
mov ax,2
int 33h
end;
procedure mousekontrol;
begin
asm
mov ax,3
int 33h
mov mButton,bx
mov mX,cx
mov mY,dx
end;
end;
begin
gd:=detect;
initgraph(gd,gm,"");
if graphresult<> 0 then halt;
setbkcolor (7);
cleardevice;setcolor (white);
line (100,100,200,100);line(100,100,100,200);
setcolor(1);line(200,200,100,200);
line (200,200,200,100);outtextxy(110,150,"Baslmad");
cik:=false;
mouseon;
repeat
mousekontrol;
if (mx<200) and (mx>100) then
if (my<200) and (my>100) then
if mbutton=1 then cik:=true;
until cik;
line (100,100,100,200);line(100,100,200,100);
setcolor(white);line(200,200,100,200);
line(200,200,200,100);
setfillstyle(7,0);
bar (105,148,180,160);
setcolor(17);
outtextxy(110,150,"Basld");
mouseon;
repeat
mousekontrol;
str(mx,s1);str(my,s2);
str(mbutton,s3);
s:=s1+":"+s2+":"+s3;
setfillstyle(7,0);
bar (15,450,100,480);
outtextxy(24,470,s);
delay(50);
until keypressed;
readln;closegraph;
end.
Mouse göstermenin birçok yolu daha var ilerde yazacagım.
Toplam Hit: 1809 Toplam Mesaj: 1