1. How to hide the cursor?
- Posted by "Juergen Luethje" <j.lue at gmx.de> May 01, 2005
- 397 views
Hello all, in a console program in text mode, hiding the cursor doesn't work as expected:
include graphics.e cursor(NO_CURSOR) puts(1, "count :\n") puts(1, "rand(10):\n\n") puts(1, "Press ESC to exit ...") integer count count = 0 while get_key() != 27 do position(1, 11) print(1, count) position(2, 11) printf(1, "%2d", {rand(10)}) count += 1 end while
I tested this code under Windows 98, using Eu 2.5 interpreters. Using EX.EXE, the cursor actually is not visible, when the program runs in _full screen_ mode. But in a _DOS window_ as well as using EXW.EXE, the cursor is visible, which causes an annoying flickering. How can I hide the cursor in these situations? Regards, Juergen -- Have you read a good program lately?
2. Re: How to hide the cursor?
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> May 01, 2005
- 400 views
On Sun, 01 May 2005 16:58:46 +0200, Juergen Luethje <j.lue at gmx.de> wrote: >Hello all, > >in a console program in text mode, hiding the cursor doesn't work as >expected: > >}}} <eucode> >include graphics.e > >cursor(NO_CURSOR) >puts(1, "count :\n") >puts(1, "rand(10):\n\n") >puts(1, "Press ESC to exit ...") <snip> try moving the cursor(NO_CURSOR) after at least one puts() statement, works for me. Regards, Pete
3. Re: How to hide the cursor?
- Posted by Greg Haberek <ghaberek at gmail.com> May 01, 2005
- 391 views
> try moving the cursor(NO_CURSOR) after at least one puts() statement, > works for me. Or try this:
cursor( NO_CURSOR ) clear_screen() -- do stuff here
~Greg
4. Re: How to hide the cursor?
- Posted by "Juergen Luethje" <j.lue at gmx.de> May 01, 2005
- 389 views
- Last edited May 02, 2005
Pete Lomax wrote: > On Sun, 01 May 2005 16:58:46 +0200, Juergen Luethje wrote: > >> in a console program in text mode, hiding the cursor doesn't work as >> expected: >> >> }}} <eucode> >> include graphics.e >> >> cursor(NO_CURSOR) >> puts(1, "count :\n") >> puts(1, "rand(10):\n\n") >> puts(1, "Press ESC to exit ...") > <snip> > try moving the cursor(NO_CURSOR) after at least one puts() statement, > works for me. Thanks for the hint, but that doesn't solve the problem on my system. Strange. Regards, Juergen
5. Re: How to hide the cursor?
- Posted by "Juergen Luethje" <j.lue at gmx.de> May 01, 2005
- 394 views
- Last edited May 02, 2005
Greg Haberek wrote: >> try moving the cursor(NO_CURSOR) after at least one puts() statement, >> works for me. > > Or try this: > > }}} <eucode> > cursor( NO_CURSOR ) > clear_screen() > > -- do stuff here > </eucode> {{{ Thanks, Greg. Unfortunately this doesn't help on my system. Regards, Juergen