>Hi All,
>
>Is there an API call out there that will tell me if the left or right mouse button is down?
>
>I'm working with a Flexgrid in a VFP6 form and having a hard time trying to determine how I got into a cell, by user keypress or mouse click. The VFP LastKey() function is useless in the ActiveX control and MCOL() doesn't seem to work either.
>
>I know there's a GetKeyState call, but I'm really looking for something along the lines of a GetMouseState. Any ideas? (I'm fresh out.)
>
>TIA
>
>Erik
Erik,
Why not use FlexGrid mouse events and call VFP methods as necessary ? It has mousedown and keydown events.
You could use GetAsyncKeyState API call too (VK_LBUTTON, VK_RBUTTON and VK_MBUTTON are 'physical' left,right,middle mouse button virtual codes - 1,2 and 4 respectively).
PS: mdown(),mcol(),mrow() work too but it'd be harder to translate coordinates to activex cell.
I strongly suggest HFlex instead of Flex.
Cetin