I'm in the process of making myself a virtual touchpad.
I used WPF, set my window to 500x250 pixels and an opacity of 0.01.
With Get/Set WindowLong it will not take focus (WS_EX_NOACTIVATE, GWL_EXSTYLE).
Using TouchDown/Up/Move/Leave and SendInput I can successfully move the mouse cursor around with my virtual trackpad, BUT:
The moment my finger touches my trackpad, windows receives two mouse inputs at the same time (from the touchpoint and my SendInput) which leads to extreme jumping around of the mouse cursor on 2 different positions.
Looking for an answer if it is possible at all (and in VB.NET) I found some programs which simulate a virtual gamepad for playing games on a Windows tablet. Some of them seem to have mouse functionality (to look around in shooter games for example). One of them beeing VirtualGamepad. It is written in VB.NET on Windows Forms.
It places a big, round button on the screen. Touching it results in the mouse moving in a specific direction slowly/fast (depending on the finger position). There are also buttons for left and right mouseclicks. The movement itself is not exactly what I want, but the way of handling the mouse cursor is.
My problem:
As soon as I touch my virtual trackpad the mouse position is moved to the touchpoint (and stays there while my finger is down).
My question is:
How do I prevent my touch input to act as mouseinput at the same time like in the program above? No matter which button(s) my finger(s) touch in VirtualGamepad, the mouse position remains where it was as it should.
I would very much appreciate code snippets or any information I can get about this.
Thanks a lot in advance.
I used WPF, set my window to 500x250 pixels and an opacity of 0.01.
With Get/Set WindowLong it will not take focus (WS_EX_NOACTIVATE, GWL_EXSTYLE).
Using TouchDown/Up/Move/Leave and SendInput I can successfully move the mouse cursor around with my virtual trackpad, BUT:
The moment my finger touches my trackpad, windows receives two mouse inputs at the same time (from the touchpoint and my SendInput) which leads to extreme jumping around of the mouse cursor on 2 different positions.
Looking for an answer if it is possible at all (and in VB.NET) I found some programs which simulate a virtual gamepad for playing games on a Windows tablet. Some of them seem to have mouse functionality (to look around in shooter games for example). One of them beeing VirtualGamepad. It is written in VB.NET on Windows Forms.
It places a big, round button on the screen. Touching it results in the mouse moving in a specific direction slowly/fast (depending on the finger position). There are also buttons for left and right mouseclicks. The movement itself is not exactly what I want, but the way of handling the mouse cursor is.
My problem:
As soon as I touch my virtual trackpad the mouse position is moved to the touchpoint (and stays there while my finger is down).
My question is:
How do I prevent my touch input to act as mouseinput at the same time like in the program above? No matter which button(s) my finger(s) touch in VirtualGamepad, the mouse position remains where it was as it should.
I would very much appreciate code snippets or any information I can get about this.
Thanks a lot in advance.