May 08, 2024, 07:32:42 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Mouse DLL

Started by GWS, February 27, 2008, 12:01:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

February 27, 2008, 12:01:16 PM Last Edit: February 29, 2008, 01:22:03 AM by GWS
Here's another DLL 'port' from EB to CB to add to the mouse features currently available.

(One of these days, they might get included properly ..  ;))

These are the three mouse routines:

Mouse(button)      -  which returns 1 (True) if the mouse 'button number' (1,2,3..4) is clicked.
Mouse_x()            -  which gives the cursor x-position (in Pixels) on the screen.
Mouse_y()            -  which gives the cursor y-position (in Pixels) on the screen.

(I had to use the underscore names to avoid name clash in EB)

(I just realised that the mouse position is already covered by system variables @mousex and @mousey - so the Mouse_x() and Mouse_y() funcitons are only another way to get the position of the mouse.)

The attached zip includes the DLL, a test program, and the code used in EB to create the DLL.

best wishes, :)

Graham

Tomorrow may be too late ..

pistol350

Hi graham!
You forgot to attach the file
Regards,

Peter B.

GWS

Tomorrow may be too late ..