Copy Link
Add to Bookmark
Report
QuickBasicNews Issue 1: Programming the Mouse with QuickBasic
…ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕª
∫ Programming the Mouse with QuickBasic ∫
»ÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕÕº
A QuickBasic specific article
Have you ever tried to figure out how to program the mouse within
your programs ? First you will need QuickBasic. Then there are
basically two ways. First you can use what is often referred to as
a Third-Party Library. This is often the easiest way because there
are many libraries available for downloading from local BBS systems.
Some libraries are free, some are shareware and still others are
public domain. The other method would be through the use of interrupts.
Next month we will include an article on interrupts that will
explain how to use both libraries and interrupts. Sample code will
be included. Although using interrupts is considered an advance
subject, don't be alarmed.... There's not that much to it once you
understand how it's done.
The use of interrupts requires several files that are supplied
with QuickBasic. They are QB.BI and QB.QLB
We will also include a very popular library next month so that
you can experiment using the library and or the interrupt calls.
In reality the library will probably be using interrupts to
control the mouse, however the way it does it is transparent to
the user and doesn't require a knowledge of interrupts.
The interrupt we will be looking at will be interrupt number 51
which has a number of functions available to it. These functions
provide information and control of the mouse. The interrupt
function might return information about the mouse location. Another
function might turn the mouse off, while another turns it on. Still
another function can limit the horizontal range of the mouse to
a certain portion of the screen. Other functions control the mouse in
other ways. There are only 256 different interrupts. Many
interrupts have many functions associated with it. The end result
being that there are thousands of functions available by using
interrupts. The next article will cover a number of these functions
in an easy to understand manner. Then you can have the control
you need to manipulate that little rodent !
Although there are numerous mouse drivers, the Microsoft mouse driver
is generally acknowledged as the standard for MS-DOS based computers.
Since this driver is so universally accepted it is the driver that will
be the topic of future discussions.