Sunday, November 23, 2008

Program which restrict the movement of pointer using c programming language

Q.Write a c program which restrict the movement of pointer?
Ans:
//restric the x and y cordinate
#include
#include
void main()
{
union REGS i,o;
//show mouse pointe
i.x.ax=1;
int86(0x33,&i,&o);
//x cordinate restiction
i.x.ax=7;
i.x.cx=20;
i.x.dx=300;
int86(0x33,&i,&o);
//y cordinate restriction
i.x.ax=8;
i.x.cx=50;
i.x.dx=250;
int86(0x33,&i,&o);
getch();
}

No comments:

Blog List