Recent

Author Topic: Turn off cursor  (Read 1015 times)

nugax

  • Jr. Member
  • **
  • Posts: 83
Turn off cursor
« on: February 04, 2018, 10:07:58 pm »
How can I turn off the cursor, in a console. I tried crt.consoleoff and it doesnt actually remove the cursor?
-Nugax

jamie

  • Hero Member
  • *****
  • Posts: 1134
Re: Turn off cursor
« Reply #1 on: February 04, 2018, 10:11:34 pm »
move it off screen?
actually you can use the SetConsoleCursorInfo

you first need to fill a TConsole_Cursor_Info and then pass that along..
« Last Edit: February 04, 2018, 10:19:32 pm by jamie »

Kays

  • Full Member
  • ***
  • Posts: 122
  • Whasup!?
    • KaiBurghardt.de
Re: Turn off cursor
« Reply #2 on: February 05, 2018, 02:12:26 am »
Depending on what you're using, to name a few:
  • nCRT.nCursor(cOFF)
  • ncurses.curs_set(0) (low-level routine)
  • video.setCursorType(crHidden)
But they all have in common, that they require some refresh in order to show an effect.
Yours Sincerely
Kai Burghardt

furious programming

  • Full Member
  • ***
  • Posts: 114
  • I click a little.
Re: Turn off cursor
« Reply #3 on: February 05, 2018, 05:32:50 am »
@nugax: you can use Crt.CursorOff and Crt.CursorOn – it works.
Lazarus 1.8.4 with FPC 3.0.4, Windows XP (all 32-bit)