C program to restrict mouse pointer in a circle
C program to restrict mouse pointer in a circle, i.e, you can't move it out of the circle. When you try to bring it outside of the circle, it is moved to its previous location which was inside the circle.
C programming code
#include<conio.h>
#include<dos.h>
#include<stdlib.h>
#include<math.h>
union REGS i, o;
int initmouse()
{
i.x.ax = 0;
int86(0X33, &i, &o);
return ( o.x.ax );
}
void showmouseptr()
{
i.x.ax = 1;
int86(0X33, &i, &o);
}