1. How to hide the cursor?

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?

new topic     » topic index » view message » categorize

2. Re: How to hide the cursor?

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: How to hide the cursor?

> 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

new topic     » goto parent     » topic index » view message » categorize

4. Re: How to hide the cursor?

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: How to hide the cursor?

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu