Smooth Text Mouse Cursor

 BBS: Inland Empire Archive
Date: 07-17-92 (16:44)             Number: 163
From: SCOTT WUNSCH                 Refer#: NONE
  To: RICH GELDRICH                 Recvd: NO  
Subj: Smooth Text Mouse Cursor       Conf: (2) Quik_Bas
  Salutations, Rich!  Great programme (and programmer)!  I
do have a few comments and complaints (can't be without
those <g>) however...

  For one thing, the EIGHT characters it takes up are too many for one of the
applications I had intended it for.  Especially in a row!
Could you make it an option to use an 8x16 bitmap instead
of 16x16 to save four characters.  I've designed a real
nice arrow for 8x16 (IMHO, it even looks better than your
16x16!).  Also, if it isn't too much work, maybe allow all
eight characters to be specified, instead of just the first.

  BTW, have you noticed that the mouse cursor is invisible
in QBX after running this from the environment (I know you
said not to, but it doesn't flicker THAT much, even on a
386SX-16)?  Could be you 'de-initialize' the mouse too much
;-).

  If you're interested, here's the stuff from MAKECSR that
I modified for my mouse cursor:

'        Cursor              Mask
DATA 0000000000000000, 0011111111111111
DATA 0100000000000000, 0001111111111111
DATA 0110000000000000, 0000111111111111
DATA 0111000000000000, 0000011111111111
DATA 0111100000000000, 0000001111111111
DATA 0111110000000000, 0000000111111111
DATA 0111111000000000, 0000000011111111
DATA 0111111100000000, 0000000001111111
DATA 0111111100000000, 0000000001111111
DATA 0111110000000000, 0000000111111111
DATA 0100110000000000, 0000000111111111
DATA 0000110000000000, 0000000111111111
DATA 0000011000000000, 1111000011111111
DATA 0000011000000000, 1111000011111111
DATA 0000000000000000, 1111111111111111
DATA 0000000000000000, 1111111111111111

  Now if only that could be put into an 8x16 matrix...

RG> ' (The 80x25 text mode resolution is 640x400, for example.)

  <Picky_Mode_On>  WRONG!  80x25 text mode on a VGA is
720x400!!  This is because the character box is actually
9x16, although you can only define the first 8 (dumb!).
This is, BTW, why using most characters for the cursor
result in a bar through it.  <Picky_Mode_Off>

RG> ' The driver should work on color VGA's and possibly
RG> EGA's (I haven't RG> ' tested it on an EGA yet). It should
RG> also work in any text mode,

  It will work on EGA, if you make a couple of changes.
EGA character boxes are 8x14 instead of x16.  So, you'd
have to change the routines a bit to work with both 14 and
16 pixel high characters if you wanted EGA compatability.

RG> link /q csrasm+intrpt,,,bqlb45.lib    (for qb4.5)

  How come you use PDS but can't even be bothered to put in
the PDS information.  In case there are any now-confused
PDS users out there,this line should do it:

Link /Q /NOD:BRT71EFR.Lib CsrAsm+Intrpt,,,QbxQlb

RG> ' seems fine. NOTE: while this driver is being used,
RG> the characters RG> ' allocated for the cursor cannot be
RG> used anywhere else on the screen!

  Sure they can!  They just won't look like what you expect! ;)

RG> ' These routines cannot be used under DESQView. To
RG> detect DESQView,RG> ' use something similar to this:
. . .

  For those of us poor souls without assemblers, here's the
BASIC equivilent (remember to $INCLUDE the file QBX.BI or
QB.BI, etc.)

InRegs.Ax = &H2B01
InRegs.Cx = &H4445    ' "DE"
InRegs.Dx = &H5351    ' "SQ"
CALL INTERRUPT(&H21, InRegs, OutRegs)
IF (OutRegs.Ax AND &HFF) = &HFF THEN
  DV = 0
ELSE
  DV = -1
END IF

RG> 'Example usage: (Please run this program compiled, it's
RG> just too slow RG> 'in the environment.)

  Nah.  It doesn't flicker THAT much, even on a 386SX-16.

RG> 'Not bad for a 16 year old high school student, huh?

  Nice to meet you, 16 year old... I'm 13!

                                   -= Scott \\'unsch =-

... It's so BASIC, it's gotta work!


--- Maximus/2 2.01wb
 * Origin: The Green Zone - Regina, Sask, Canada (1:140/23)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET