Hey, quick question, do any of you fellas know how to print a line of text to the screen without that tacky flashing cursor being there every single time?
I only want the cursor to be visible when the user is doing data entry. Thanks in advance.
Hey, quick question, do any of you fellas know how to print a line of text to the screen without that tacky flashing cursor being there every single time?
I only want the cursor to be visible when the user is doing data entry. Thanks in advance.
Excuse me, while I water my money tree.
This is a nonstandard feature, here's the way to do it in Windows:
When you want the cursor to be visible, simply change bVisible to 1 or some variation of true and call SetConsoleCursorInfo again.Code:#include <windows.h> #include <stdio.h> int main ( void ) { CONSOLE_CURSOR_INFO c; c.dwSize = 1; c.bVisible = 0; SetConsoleCursorInfo ( GetStdHandle ( STD_OUTPUT_HANDLE ), &c ); printf ( "This is a program with no cursor\nHit any key to proceed\n" ); getchar(); return 0; }
-Prelude
My best code is written with the delete key.
Hi ,
You can also use the conio.c header file , just read through it , you should get the I D A .
Cheers
>You can also use the conio.c header file
Can you guarantee that conio will have what is needed for any compiler on a given operating system? If you said yes, you're wrong. Borland has an extensive conio file, but just about every other compiler won't have those features and the program will break. At least using the Windows API you can be sure it will work on all Win32 compilers. In the case of nonstandard features, you pick the option that is the most portable.
-Prelude
My best code is written with the delete key.
Prelude, YOU THE MAN!!
Dude, you are THE bomb. U R 2 cool 2 B real...
Excuse me, while I water my money tree.