none
Hand gestures on a Surface Pro 3.

    Question

  • Hi;

    I hope to receive a Surface Pro 3 I ordered recently, and I was wondering if there is a way to gesture enable a VFP application. Mainly I would like to zoom into a photo on a form, or maybe skip through photos.

    Is this even possible?

    Thanks.

    Friday, October 10, 2014 3:12 PM

Answers

  • Hi Aleniko,

    You can fully implement this functionality with VFP and You don't need any further SDK or DLLs.

    - zoom-in/zoom-out-gesture:

    the control (for example an image-control) will receive MouseWheel-events with the following parameters:

    nDirection > 0    for zooming in
    nDirection < 0    for zooming out
    nShift = 2

    - wipe-gesture:

    you have to track the following three events:

    1) MouseDown-event
    nButton = 1
    nShift = 0
    nXCoord, nYCoord = starting mouse coordinates

    means wipe-gesture is now starting

    2) MouseMoveEvent
    nButton = 1
    nShift = 0
    nXCoord, nYCoord = new mouse coordinates

    means wipe-gesture is now in action (for example: skip through photos now)

    3) MouseUp-event
    nButton = 1
    nShift = 0

    means wipe-gesture has finished (for example: stop skipping)


    Regards, Stefan

    • Marked as answer by Aleniko2 Monday, October 13, 2014 2:15 PM
    Monday, October 13, 2014 1:59 PM

All replies

  • Hi;

    I hope to receive a Surface Pro 3 I ordered recently, and I was wondering if there is a way to gesture enable a VFP application. Mainly I would like to zoom into a photo on a form, or maybe skip through photos.

    Is this even possible?

    Thanks.

    Do you get your surface pro 3? I have no idea since I don't have surface pro 3, but for my undersatnding, that should be possible, since we could just treat them as a common mouse.


    remember make the reply as answer and vote the reply as helpful if it helps.

    Monday, October 13, 2014 8:28 AM
  • Hi,

    the best you can do with VFP is pen based input by using the Microsoft® Tablet PC Platform SDK.

    Hand gestures are something completely different from mouse/pen input. To give you a first impression, what you can do with VFP and pens, have a look at this white paper written by Markus Egger (EPS)

    http://www.eps-cs.com/pdf/whitepaper_tabletpc.pdf

    and a page from Microsoft about creating Tablet PC applications with VFP

    http://msdn.microsoft.com/en-us/library/ms965060.aspx

    however, this 'INK-based' SDK was programmed a long time ago and modern UIs don't use it anymore. So with each new version of Windows you will have to test, if it can still be used.

    edit:

    also have a look at this thread right in this forum:

    https://social.msdn.microsoft.com/Forums/en-US/98a7ec17-3a96-4b5b-b65b-a8010480ff9d/inkobjdll-doesnt-work-for-a-vfp-9-application-on-windows-81?forum=visualfoxprogeneral


    Gruss / Best regards
    -Tom
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible,
    you are, by definition, not smart enough to debug it. 010101100100011001010000011110000101001001101111011000110110101101110011



    Monday, October 13, 2014 9:22 AM
    Moderator
  • Tom;

    Thank you for your detail response.

    Are you saying that the 'newer' sdk platforms won't support Foxpro and thus my only choice is the ink sdk which is outdated? I would obviously rather use the newer SDK platforms if possible, especially after reading the last link which  basically says ink won't run on 8.1...

    Any further info would be greatly appreciated.

    Monday, October 13, 2014 1:21 PM
  • Hi Aleniko,

    You can fully implement this functionality with VFP and You don't need any further SDK or DLLs.

    - zoom-in/zoom-out-gesture:

    the control (for example an image-control) will receive MouseWheel-events with the following parameters:

    nDirection > 0    for zooming in
    nDirection < 0    for zooming out
    nShift = 2

    - wipe-gesture:

    you have to track the following three events:

    1) MouseDown-event
    nButton = 1
    nShift = 0
    nXCoord, nYCoord = starting mouse coordinates

    means wipe-gesture is now starting

    2) MouseMoveEvent
    nButton = 1
    nShift = 0
    nXCoord, nYCoord = new mouse coordinates

    means wipe-gesture is now in action (for example: skip through photos now)

    3) MouseUp-event
    nButton = 1
    nShift = 0

    means wipe-gesture has finished (for example: stop skipping)


    Regards, Stefan

    • Marked as answer by Aleniko2 Monday, October 13, 2014 2:15 PM
    Monday, October 13, 2014 1:59 PM
  • Stefan;

    Wow. Sounds too easy to be true.

    Will test this, but a very big thank you!

    Monday, October 13, 2014 2:06 PM
  • The mouse wheel 'pinch' Works like a charm. thanks.
    Monday, October 13, 2014 2:15 PM
  • Hi Aleniko,

    - the easiest solutions are the best solutions  :-)

    Regards, Stefan

    Monday, October 13, 2014 2:21 PM
  • Hi Aleniko,

    one additional hint:

    if your VFP-application needs the functionality of right mouse clicks (for context menus, etc.) tap on the touch screen and stay on the touch screen until a circle is displayed.

    Release now your finger and VFP will receive an event for a right mouse click.

    Regards, Stefan

    Monday, October 13, 2014 2:52 PM