Q:

Write a C Program to Hide Mouse Pointer using Graphics

0

Write a C Program to Hide Mouse Pointer using Graphics. Here’s simple Program to Hide Mouse Pointer using Graphics in C Programming Language.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Below is the source code for C Program to Hide Mouse Pointer using Graphics which is successfully compiled and run on Windows System to produce desired output as shown below :

 
 


SOURCE CODE : :

/*  C Program to Hide Mouse Pointer using Graphics  */

#include<graphics.h>
#include<conio.h>
#include<dos.h>

void showmouseptr();
void hidemouseptr();

union REGS i, o;

int main() {
   int count = 1, gDriver = DETECT, gMode;

   initgraph(&gDriver, &gMode, "C\\:tc\\bgi");

   i.x.ax = 0;
   int86(0X33, &i, &o);

   if (o.x.ax == 0) {
      printf("ntMouse Support is Unavailable !!");
   } 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;
   int86(0X33, &i, &o);
}

Above is the source code for C Program to Hide Mouse Pointer using Graphics which is successfully compiled and run on Windows System.The Output of the program is shown above .

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Graphic Solved Programs – C Programming

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C Program to draw Inductive Coil using Gra... >>
<< Write a C Program to Show the ticking Clock using ...