

co ban nao biet su dung chuột trong pascal ko ,dạy mình với
thank trước nha
thank trước nha
co ban nao biet su dung chuột trong pascal ko ,dạy mình với
thank trước nha
Bạn có thể sử dụng Notepad++ để edit code sau đó lưu dưới dạng ten_tep.pas thì sẽ tiện hơn khi thao tác. Chỉ dùng Pascal để chạy chương trình
Bạn có thể tham khảo bài viết của @trà nguyễn hữu nghĩa
{Mouse.pas}
Var mouseX,mouseY:word;
mouseL,mouseR:boolean;
Procedure showmouse;
Begin
Asm
mov ax,1
int 33h
End;
End;
Procedure hidemouse;
Begin
Asm
mov ax,2
int 33h
End;
End;
Function mouseevent:boolean;
Var t:word;
Begin
Asm
mov ax,3
int 33h
mov mouseX,cx
mov mouseY,dx
mov t,bx
End;
mouseY:=mouseY div 8 +1;
mouseX:=mouseX div 8 +1;
mouseEvent:=t<>0;
mouseL:=boolean(t and 1);
mouseR:=boolean(t and 2);
End;
Function mouseeventgr:boolean;
Var t:word;
Begin
Asm
mov ax,3
int 33h
mov mouseX,cx
mov mouseY,dx
mov t,bx
End;
inc(mouseX);
inc(mouseY);
mouseEventgr:=t<>0;
mouseL:=boolean(t and 1);
mouseR:=boolean(t and 2);
End;
Hi,mình hiểu nhầm câu hỏiMã:{Mouse.pas} Var mouseX,mouseY:word; mouseL,mouseR:boolean; Procedure showmouse; Begin Asm mov ax,1 int 33h End; End; Procedure hidemouse; Begin Asm mov ax,2 int 33h End; End; Function mouseevent:boolean; Var t:word; Begin Asm mov ax,3 int 33h mov mouseX,cx mov mouseY,dx mov t,bx End; mouseY:=mouseY div 8 +1; mouseX:=mouseX div 8 +1; mouseEvent:=t<>0; mouseL:=boolean(t and 1); mouseR:=boolean(t and 2); End; Function mouseeventgr:boolean; Var t:word; Begin Asm mov ax,3 int 33h mov mouseX,cx mov mouseY,dx mov t,bx End; inc(mouseX); inc(mouseY); mouseEventgr:=t<>0; mouseL:=boolean(t and 1); mouseR:=boolean(t and 2); End;
Không sao đâu ai cũng có lúc nhầm lẫn màHi,mình hiểu nhầm câu hỏi![]()
Mã:{Mouse.pas} Var mouseX,mouseY:word; mouseL,mouseR:boolean; Procedure showmouse; Begin Asm mov ax,1 int 33h End; End; Procedure hidemouse; Begin Asm mov ax,2 int 33h End; End; Function mouseevent:boolean; Var t:word; Begin Asm mov ax,3 int 33h mov mouseX,cx mov mouseY,dx mov t,bx End; mouseY:=mouseY div 8 +1; mouseX:=mouseX div 8 +1; mouseEvent:=t<>0; mouseL:=boolean(t and 1); mouseR:=boolean(t and 2); End; Function mouseeventgr:boolean; Var t:word; Begin Asm mov ax,3 int 33h mov mouseX,cx mov mouseY,dx mov t,bx End; inc(mouseX); inc(mouseY); mouseEventgr:=t<>0; mouseL:=boolean(t and 1); mouseR:=boolean(t and 2); End;
Gõ code vào chương trìnhSử dụng cái code này thế nào hả bạn
Ồ ! Em cũng đang cầnMã:{Mouse.pas} Var mouseX,mouseY:word; mouseL,mouseR:boolean; Procedure showmouse; Begin Asm mov ax,1 int 33h End; End; Procedure hidemouse; Begin Asm mov ax,2 int 33h End; End; Function mouseevent:boolean; Var t:word; Begin Asm mov ax,3 int 33h mov mouseX,cx mov mouseY,dx mov t,bx End; mouseY:=mouseY div 8 +1; mouseX:=mouseX div 8 +1; mouseEvent:=t<>0; mouseL:=boolean(t and 1); mouseR:=boolean(t and 2); End; Function mouseeventgr:boolean; Var t:word; Begin Asm mov ax,3 int 33h mov mouseX,cx mov mouseY,dx mov t,bx End; inc(mouseX); inc(mouseY); mouseEventgr:=t<>0; mouseL:=boolean(t and 1); mouseR:=boolean(t and 2); End;
Sao nó lỗi tùm lum vậy bạn
View attachment 68988
Em xem dùng được không mà bạn kia không dùng được =__=Ồ ! Em cũng đang cầnCảm ơn anh nhiều =)
Rất là có ích![]()
Em chưa test nữa ! Nhưng bạn em dùng abor đượcEm xem dùng được không mà bạn kia không dùng được =__=
Em xem dùng được không mà bạn kia không dùng được =__=