Home / C / Restrict Mouse Pointer Position C Graphics Program

Restrict Mouse Pointer Position C Graphics Program

This C Program will restrict the Mouse Pointer location or to a particular position or x,y coordinates. The C Graphics Mouse Program will give you more insights.

The Other Similar Programs are:

Restrict Mouse Pointer in Circle

Restrict Mouse Pointer in Rectangle

//restrict the x and y coordinate
#include <dos.h>
#include <stdio.h>
void main()
{
union REGS i,o;
//show mouse pointer
i.x.ax=1;
int86(0x33,&i,&o);
//x coordinate restriction
i.x.ax=7;
i.x.cx=20;
i.x.dx=300;
int86(0x33,&i,&o);
//y coordinate restriction
i.x.ax=8;
i.x.cx=50;
i.x.dx=250;
int86(0x33,&i,&o);
getch();
}

 

Check Also

C Program to restrict Mouse pointer in a Rectangle

This C Program will restrict the Mouse pointer Position in the Rectangle. The Mouse Programs are listed here ...

Leave a Reply

Your email address will not be published. Required fields are marked *

Preventing spam * Time limit is exhausted. Please reload the CAPTCHA.