| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Cursed cursor |
Donald, at 19:45 on Apr 11 1996, you wrote to All ...
DG> I NEED to find a way to get rid of the blinking cursor when
DG> i do anything in textmode in pascal.
DG> for example e.g.
DG> writeln ('enter your name');
DG> readln(name); <------- while pascal is waiting for the
DG> person to enter his/her name, there will be a blinking cursor
DG> there .... i don't want it!
Try this :
---------------------------------------------------------------
Unit CurStuf;
Interface
Procedure NoCursor;
Procedure RestoreCursor;
Implementation
Uses
DOS;
Var
OldCursor : Word;
Function CursorSize : Word;
Var
Regs : registers;
Begin
Regs.AH :=3;
Regs.BH :=0;
Intr($10,Regs);
CursorSize := Regs.CX and $1F1F;
End; (* cursorSize *)
Procedure SetCursorSize(HiLo : Word);
Var
Regs : registers;
Begin
Regs.AH := 01;
Regs.CX := HiLo;
Intr($10,Regs);
End; (* setcursorsize *)
Procedure SaveCursor;
Begin
OldCursor := CursorSize;
End; (* savecursor *)
Procedure RestoreCursor;
Begin
SetCursorSize(OldCursor);
End; (* restorecursor *)
Procedure NoCursor;
Begin
SetCursorSize($2000);
End; (* nocursor *)
(* Initialisation *)
Begin
SaveCursor;
End.
------------------------------------------------------------------
It's fairly old code, but it still works.
David
@EOT:
--- Msgedsq/2 3.10
* Origin: JabberWOCky CBCS +61 7 3868 1597 (3:640/305)SEEN-BY: 633/267 270 @PATH: 640/305 820 711/409 808 50/99 635/544 727 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.