private void MainPage_Loaded(object sender, RoutedEventArgs e) { Manipulator man = new Manipulator(); POINT cursorPoint; GetCursorPos(out cursorPoint); // Positive value for scroll up man.leftDown(cursorPoint.x, cursorPoint.y); man.leftUp(cursorPoint.x, cursorPoint.y); INPUT[] input = new INPUT[1]; input[0].type = 0; Debug.Print("cursor: {0}, {1}", (cursorPoint.x * 65536) / 1920, (cursorPoint.y * 65536) / 1080); input[0].U.mi = new MOUSEINPUT { dwFlags = MOUSEEVENTF.WHEEL | MOUSEEVENTF.ABSOLUTE, dwExtraInfo = new UIntPtr(0), dx = (cursorPoint.x * 65536) / 1920, dy = (cursorPoint.y * 65536) / 1080, mouseData = 2400, time = 0 }; //mouse_event(MOUSEEVENTF.WHEEL, 0, 0, DWORD(-WHEEL_DELTA), 0); SendInput(1, input, INPUT.Size); }
public MainWindow() { InitializeComponent(); ReadConfiguration.read("../../MyConfiguration.txt"); eTracker = new EngagerTracker(); eManager = new EngagementManager.EngagementManager(); drawer = new Drawer(); man = new Manipulator.Manipulator(eTracker); recogniser = new GestureRecogniser.GestureRecogniser(eTracker); Loaded += MainPage_Loaded; Closing += MainWindow_Closing; }