In this program, we are going to share how to display mouse pointer in textmode using C programming language. If you are a beginner and want to start learning the C programming, then keep your close attention in this tutorial as I am going to share a C program to display mouse pointer in textmode.
Copy the below C program and execute it with the help of C compiler. At the end of this program, We have shared the output of this program.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include<stdio.h> #include<dos.h> int initmouse(); void showmouseptr(); union REGS i, o; int main() { int status; status = initmouse(); if (status == 0) { printf("Mouse support not available.n"); } else { showmouseptr(); } return 0; } int initmouse() { i.x.ax = 0; int86(0X33, &i, &o); return (o.x.ax); } void showmouseptr() { i.x.ax = 1; int86(0X33, &i, &o); } |
Liked this program? Do Like & share with your friends 🙂
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: c program to change mouse cursor, c program to hide cursor, c program to hide mouse pointer, c programming mouse click, c programs, c programs with output, c programs with solutions, list of important c programs, mouse event in c program, mouse pointer in c, mouse programming in c