Which mouse button has been pressed

Which mouse button has been pressed

Anonymous
Not applicable
230 Views
2 Replies
Message 1 of 3

Which mouse button has been pressed

Anonymous
Not applicable
Hi All

When running a VBA routine & the drawing area is active, is there a way to
determine which mouse button has been pressed?

Basically I want to Ask a question with the left button = Yes & the right
one = No without using a dialogue box.

Previously I achieved that by using the getpoint command & test to see if a
point is returned.

I now need a 3rd option & want to test for the middle button.

your help would be much appreciated.

Thanks in advance

Dave
0 Likes
231 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
If you have MBUTTONPAN turned on, then there's no simple
way to detect the middle mouse button, because AutoCAD
intercepts it and handles it transparently.

If you turn MBUTTONPAN off then you can use the ReadInput
method of the DrawingEditor class in AcadX.arx to detect
which mouse button was pressed (it will return 1 for the
middle button, 0 for the right button, or a coordinate
for the pick button).

http://www.caddzone.com/acadx


"david fox" wrote in message news:0DEA24EF6C670DAF52E7095093797FE8@in.WebX.maYIadrTaRb...
> Hi All
>
> When running a VBA routine & the drawing area is active, is there a way to
> determine which mouse button has been pressed?
>
> Basically I want to Ask a question with the left button = Yes & the right
> one = No without using a dialogue box.
>
> Previously I achieved that by using the getpoint command & test to see if a
> point is returned.
>
> I now need a 3rd option & want to test for the middle button.
>
> your help would be much appreciated.
>
> Thanks in advance
>
> Dave
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thanks for that. I'll give it a go

Dave

"Tony Tanzillo" wrote in message
news:A2EC406D4AA44A447CC804CC3C0054C5@in.WebX.maYIadrTaRb...
> If you have MBUTTONPAN turned on, then there's no simple
> way to detect the middle mouse button, because AutoCAD
> intercepts it and handles it transparently.
>
> If you turn MBUTTONPAN off then you can use the ReadInput
> method of the DrawingEditor class in AcadX.arx to detect
> which mouse button was pressed (it will return 1 for the
> middle button, 0 for the right button, or a coordinate
> for the pick button).
>
> http://www.caddzone.com/acadx
>
>
> "david fox" wrote in message
news:0DEA24EF6C670DAF52E7095093797FE8@in.WebX.maYIadrTaRb...
> > Hi All
> >
> > When running a VBA routine & the drawing area is active, is there a way
to
> > determine which mouse button has been pressed?
> >
> > Basically I want to Ask a question with the left button = Yes & the
right
> > one = No without using a dialogue box.
> >
> > Previously I achieved that by using the getpoint command & test to see
if a
> > point is returned.
> >
> > I now need a 3rd option & want to test for the middle button.
> >
> > your help would be much appreciated.
> >
> > Thanks in advance
> >
> > Dave
> >
> >
>
>
0 Likes