CompuServe Thread

Cursor On/Off

4 messages in this thread
#20358From: Eric SchultzFeb 13, 1992 11:12 PM
How can I get rid of (or toggle on and off) the cursor displayed in a window when using the console for input/output?
#20372From: Charles ConlowFeb 14, 1992 10:38 AM
How to turn the console.device's cursor ON/OFF is simple. To ENABLE the cursor (which is the default), send the hex sequence '9b 20 70'. To DISABLE the cursor (which speeds up text displayed via the console.device) send the hex sequence '9b 30 20 70'. This info, and MUCH more can be found in the RKM:Devices. Charles Conlow @ Artemis Systems – via Whap!
#20567From: Eric SchultzFeb 19, 1992 9:40 PM
OK…here's what I have done. (The ConOutStr routine send characters to the console.device) When I want to turn the cursor off, I use: ConOutStr("\0x9b\0x30\0x20\0x70"); And to turn it back on, I use: ConOutStr("\0x9b\0x20\0x70"); The only problem is…..it doesn't seem to work. The cursor always stays on in the window. Am I missing something obvious? -Eric
#20590From: Charles ConlowFeb 20, 1992 11:56 AM
Eric: I don't know how you've coded your 'ConOutStr()', but here's something I just tested (and use quite a bit myself)…. some_function( ) { char buffer[ 256 ]; memset( buffer, 0, 256 ); sprintf( buf, "%c%c%c%c", 0x9b, 0x30, 0x20, 0x70 ); ConOutStr( buf ); }; You can mess with the 'buffer' business as you like. And by pre-defining some arrays of characters, any control sequences you like can be sent to the console device (i.e. ConOutStr( Clear_String_buffer ), ConOutStr( Cursor_Left_Buffer) ). By doing a modest amount of debugging (even using 'printf()' stuff, you can see what's being sent to the device. Charles Conlow @ Artemis Systems – via Whap!