Help with 'Hide cursor' 
Author Message
 Help with 'Hide cursor'

Does someone know how to hide the cursor..The blinking slash ??????

Thanks in advance !?!



Wed, 18 Jun 1902 08:00:00 GMT  
 Help with 'Hide cursor'


:Does someone know how to hide the cursor..The blinking slash ??????

 96535 Mar 30 20:19 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip
 tsfaqp.zip Common Turbo Pascal Questions and Timo's answers

   All the best, Timo

....................................................................

Moderating at ftp:// & http://garbo.uwasa.fi archives  193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa



Wed, 18 Jun 1902 08:00:00 GMT  
 Help with 'Hide cursor'

Quote:

> Does someone know how to hide the cursor..The blinking slash ??????

> Thanks in advance !?!

Try this

Procedure CursorGone;
Var
  Regs:Registers;
Begin
  Regs.ah:=$01;
  Regs.ch:=$20;
  Regs.cl:=$0E;
  Intr($10,regs);
End;

Procedure CursorBack;
Var
  Regs:Registers;
Begin
  Regs.ah:=$01;
  Regs.ch:=$0D;
  Regs.cl:=$0E;
  Intr($10,regs);
End;

Good Luck
Jerry



Wed, 18 Jun 1902 08:00:00 GMT  
 Help with 'Hide cursor'

Quote:

> Does someone know how to hide the cursor..The blinking slash ??????

        Here you go...

{--SNIP--}

procedure cursoroff; assembler;

          asm {cursor off}
              mov ah, 01h
              mov ch, 01
              mov cl, 00
              int 10h
          end;

{--SNIP--}

        and if you want to turn it back on...

{--SNIP--}

procedure cursoron; assembler;

          asm {cursor on}
              mov ah, 01h
              mov ch, 06
              mov cl, 07
              int 10h
          end;

{--SNIP--}

        Hope that helps. Ciao!

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
       Paul Matthews - Lead Programmer : Creative Logic Software
        Check out the ALL NEW Creative Logic Software Homepage!
                 http://www.singnet.com.sg/~pmatth/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Wed, 18 Jun 1902 08:00:00 GMT  
 Help with 'Hide cursor'

Quote:


> > Does someone know how to hide the cursor..The blinking slash ??????

>    Here you go...

> {--SNIP--}

> procedure cursoroff; assembler;

>           asm {cursor off}
>               mov ah, 01h
>               mov ch, 01
>               mov cl, 00
>               int 10h
>           end;

> {--SNIP--}

This will work, but there's a better way.

Quote:
>    and if you want to turn it back on...

> {--SNIP--}

> procedure cursoron; assembler;

>           asm {cursor on}
>               mov ah, 01h
>               mov ch, 06
>               mov cl, 07
>               int 10h
>           end;

> {--SNIP--}

*This* is not ok!

You've just set the cursor to the default CGA cursor. On anything else,
this gives you a cursor that looks like a hyphen! You have to determine
the screen type. If it is MDA or Hercules, then use 11 and 12 instead
of 6 and 7.

For anything else, you want to use the Int 10h function that *tells*
you what the start and end line of the cursor is, the OR the start line
with 20H (if I recall correctly, check Ralf Brown's Interrupt list for
details). Then to restore the cursor you just read the values again and
And with a mask that'll strip out the bit you set.

The reason for treating the MDa and Herc differently is thaty the "read
cursor start/end line" call returns the wrong values on those cards.

See Timo's FAQ for more details on all of this.

Leonard Erickson (aka Shadow)




Wed, 18 Jun 1902 08:00:00 GMT  
 Help with 'Hide cursor'

Quote:

> > Does someone know how to hide the cursor..The blinking slash ??????

> > Thanks in advance !?!

> Try this

> Procedure CursorGone;
> Var
>   Regs:Registers;
> Begin
>   Regs.ah:=$01;
>   Regs.ch:=$20;
>   Regs.cl:=$0E;
>   Intr($10,regs);
> End;

> Procedure CursorBack;
> Var
>   Regs:Registers;
> Begin
>   Regs.ah:=$01;
>   Regs.ch:=$0D;
>   Regs.cl:=$0E;
>   Intr($10,regs);
> End;

That restored cursor is gonna look *real* strange on a CGA or Hercules
screen.... :-)

Leonard Erickson (aka Shadow)




Wed, 18 Jun 1902 08:00:00 GMT  
 Help with 'Hide cursor'

Quote:

> You've just set the cursor to the default CGA cursor. On anything else,
> this gives you a cursor that looks like a hyphen! You have to determine
> the screen type. If it is MDA or Hercules, then use 11 and 12 instead
> of 6 and 7.

> For anything else, you want to use the Int 10h function that *tells*
> you what the start and end line of the cursor is, the OR the start line
> with 20H (if I recall correctly, check Ralf Brown's Interrupt list for
> details). Then to restore the cursor you just read the values again and
> And with a mask that'll strip out the bit you set.

        This is true, but how many people do you see using CGA monitors these days?

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
       Paul Matthews - Lead Programmer : Creative Logic Software
        Check out the ALL NEW Creative Logic Software Homepage!
                 http://www.singnet.com.sg/~pmatth/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Wed, 18 Jun 1902 08:00:00 GMT  
 Help with 'Hide cursor'

Quote:


> > You've just set the cursor to the default CGA cursor. On anything else,
> > this gives you a cursor that looks like a hyphen! You have to determine
> > the screen type. If it is MDA or Hercules, then use 11 and 12 instead
> > of 6 and 7.

> > For anything else, you want to use the Int 10h function that *tells*
> > you what the start and end line of the cursor is, the OR the start line
> > with 20H (if I recall correctly, check Ralf Brown's Interrupt list for
> > details). Then to restore the cursor you just read the values again and
> > And with a mask that'll strip out the bit you set.

>    This is true, but how many people do you see using CGA monitors
> these days?

Re-read what I wrote. The code was setting things to the *CGA* cursor,
which looks damn funny on anything else.

And I do see a fair number of people using CGA and mono monitors. Not
everyone can afford new gear. Some can only afford what other folks
consider junk.

Leonard Erickson (aka Shadow)




Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Hiding 'SQL' cursor when accessing database

2. 'Error creating cursor handle'

3. InfoPower QBE: 'Error creating cursor handle'

4. Error: 'To many open cursors'

5. IndexDefs.Add('Help','Please',[ixD2WorksGreat, ixD3Errors])

6. DBGrid Columns won't hide

7. Help on Hiding the Cursor

8. Help to hide cursor

9. Progam Help = Hide cursor

10. Screen.Cursor problems with DLL's

11. BPW 7.01 + Win'95 = nasty cursor

12. Event when DB-cursor's moved

 

 
Powered by phpBB® Forum Software