Sunday , December 11 2016
Home / C / Hide Mouse Pointer C Program

Hide Mouse Pointer C Program

How to Hide a Mouse Pointer Program in C : This program will show and hide the mouse pointer after each user input by a key stroke.

Illustration & Example: There are two functions used in the program-

  • showmousepointer(); -> To Show / display the pointerHide Mouse pointer
  • hidemousepointer(); -> to Hide / disappear the pointer

 

  1. Initialise the Graphics using a graphic driver variable.
  2. Then Check the Mouse Availability. Display error message if not available.
  3. After checking the Mouse use a While Loop to hide and show the Mouse pointer on user input / key stroke using Getch().

Hide/ Disappear Mouse Pointer Program

This will check if the mouse driver exists or not.

Input Output Comment
ax=0x0000 ax=0x0000 or 0xFFFF
bx=number of buttons
0x0000 installed
0xFFFF not installed

Int 33,0×01 : Show Mouse cursor

Input Output Comment
ax=0x0001 none

Int 33,0×02 : Hide Mouse Cursor

Input Output Comment
ax=0x0002 none

In and out register must be type of REGS. REGS is a built in UNION declaration in C. It is defined in the dos.h header file

Syntax :

Also See:   C program for priority scheduling

Check Also

C Program to find the Largest Digit in the Number

Write a Program in C to find the Largest Digit in the number. This is a simple code ...

Leave a Reply

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

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