Would you mind using an extra library or OBJ file?

by (Login Mikrondel)
Moderator

I hunted through the QB runtime library and found something called b$ForeColor. It looked promising, so I linked the following two programs:

;;;FORE.ASM;;; (NASM syntax)

BITS 16

EXTERN b$ForeColor
GLOBAL GetForeColor

GetForeColor: ;the shortest useful function I've ever written
MOV AX, [b$ForeColor]
RETF

;;;;;;;;;;;;;;



...........and.............



'''TEST.BAS'''

DECLARE FUNCTION GetForeColor% ()
'...
PRINT GetForeColor

''''''''''''''


It worked!

I suspect that if you make a LIB and QLB out of it it will work in the interpreter as well as compiled.

Note: only tested with QB7.1. I suspect it will work with QB4.5 but I don't think this is possible with QB1.1

Posted on Jul 19, 2010, 1:40 AM

Respond to this message   

Return to Index