Cutch

Cutch

  • NA
  • 14
  • 0

How do i programically scroll with the mouse.

Feb 8 2008 5:56 PM

I know how to programically press the left and right mouse butons, but can any one tell me how to press the middle button and scroll both vertically and horizantally.

 

Ideally I just need the UInt32 for the 5 functions scroll up, down, left, right, and middle mouse button press.

 

This is what I have so far:

const UInt32 MouseEventLeftDown = 0x0002;

const UInt32 MouseEventLeftUp = 0x0004;

const UInt32 MouseEventRightDown = 0x0008; 
const UInt32 MouseEventRightUp = 0x0010;
public static void rClick()
{
mouse_event(MouseEventRightDown, 0, 0, 0, new System.IntPtr());
mouse_event(MouseEventRightUp, 0, 0, 0, new System.IntPtr());
}
public static void Click()
{
mouse_event(MouseEventLeftDown, 0, 0, 0, new System.IntPtr());
mouse_event(MouseEventLeftUp, 0, 0, 0, new System.IntPtr());
mouse_event(MouseEventLeftDown, 0, 0, 0, new System.IntPtr());
mouse_event(MouseEventLeftUp, 0, 0, 0, new System.IntPtr());
}
 
Thank you for any help.

Answers (1)