C program to hide the mouse pointers.
In this program, we hide the mouse pointers using graphics.h and dos.h library functions.
To use graphics.h, we have to install the drivers in to the the system by using the initgraph() function.
In this program, we hide the mouse pointers using graphics.h and dos.h library functions.
To use graphics.h, we have to install the drivers in to the the system by using the initgraph() function.
/***********************************************************
* You can use all the programs on www.c-program-example.com
* for personal and learning purposes. For permissions to use
the
* programs for commercial purposes,
* contact info@c-program-example.com
* To find more C programs, do visit www.c-program-example.com
* and browse!
*
*
Happy Coding
***********************************************************/
#include<graphics.h>
#include<conio.h>
#include<dos.h>
void showmouseptr();
void hidemouseptr();
union REGS i, o;
int main()
{
int count = 1, gd = DETECT, gm;
initgraph(&gd,&gm,"C:\TC\BGI");/*check your path, to
install the drivers in to the the system*/
i.x.ax = 0;
int86(0X33,&i,&o);
if(o.x.ax == 0)
{
printf("nt Sorry! Mouse support not available !");
}
else
{
showmouseptr();
while(count<=10)
{
getch();
count++;
if(count%2==0)
hidemouseptr();
else
showmouseptr();
}
}
getch();
return 0;
}
void showmouseptr()
{
i.x.ax = 1;
int86(0X33,&i,&o);
}
void hidemouseptr()
{
i.x.ax = 2; // to hide mouse
int86(0X33,&i,&o);
}
No comments:
Post a Comment