Using the mouse

I'm having problems using the mouse in my program.

I want the user to select a color by clicking in the proper box but there is no SET MOUSE command and SET CURSOR doesn't seem to do it.

I get a "cursor out of bounds" error as soon as the GET MOUSE statement is executed.

Solution?

Roger

Comments

Re: using the mouse

Below is an example of mouse polling that I use extensively. The sys_event call in the subroutine is to catch Windows exits via the 'x' button of the menu bar.

The example executes the 'do whatever' if the mouse button is pressed and the pointer is within the rectangular area defined by abcd.

do
call mg(x,y,s)
if s = 2 and x > a and x < b and y > c and y < d then
'do whatever'
exit do
end if
loop

SUB mg(MX,MY,S)
CALL sys_event(0,event$,window,Mx,My)
IF event$ = "HIDE" then
CALL tc_cleanup
STOP
END IF
LET Mx = 0
LET My = 0
LET s = 0
GET MOUSE Mx,My,s
END SUB

If this doesn't help, we probably need to seem some of your code.

Rick

Rick; That did it,

Rick;

That did it, thanks!

Roger