BBS: Inland Empire Archive Date: 10-28-92 (13:44) Number: 385 From: CORIDON HENSHAW Refer#: NONE To: JOHN SNEERINGER Recvd: NO Subj: Mouse cursor Conf: (2) Quik_Bas
Hello John!
In a msg of <22 Oct 92>, John Sneeringer writes to All:
JS> By default, the mouse cursor is a solid block.
JS> I would like to see some code (please) that will change the ascii
JS> character to be used as the mouse cursor ...to chr$(4) or something
JS> else rather...
Hmmmm...(sound of rummaging through a 3MB basic source
directory....) Ah, this is what you need:
===Cut===
'$INCLUDE: 'QBX.BI'
SUB MouseSetCursor (SmaskChar%, SMaskAttr%, CMaskChar%, CMaskAttr%)
IF GetMode <> FALSE THEN ERROR 5
DIM Regs AS RegType
IF SMaskAttr% AND 2 ^ 7 THEN
TempS% = -1 XOR &H7FFF
ELSE
TempS% = 0
END IF
IF CMaskAttr% AND 2 ^ 7 THEN
TempC% = -1 XOR &H7FFF
ELSE
TempC% = 0
END IF
Regs.Bx = 0
Regs.CX = TempS% OR (256 * (SMaskAttr% AND &H7F) + SmaskChar%)
Regs.DX = TempC% OR (256 * (CMaskAttr% AND &H7F) + CMaskChar%)
Regs.AX = &HA
CALL INTERRUPT(&H33, Regs, Regs)
END SUB
===Cut===
There you go.
Coridon
...I have a dream ... DIR C: ... 999,937,498,127,857 bytes free
--- GEcho 1.00
* Origin: TCS Concordia - Private - Toronto, Ontario (FidoNet 1:250/820)

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