Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP and touchscreen monitors
Message
From
24/01/2013 07:55:32
 
 
To
24/01/2013 04:46:42
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01563559
Message ID:
01563949
Views:
75
>>I've written a VFP app that utilized a touch screen. It was a Point of Sale app for a restaurant. There was nothing special that I had to do except make the command buttons larger to accommodate fat fingers. All clicks and drags are the same as before...you don't have to do anything different. It just worked.
>>
>>Be aware that there won't be any "right click" capabilities as is so you'll need to come up with a different way to do that if its needed. Also, scrollbars were the only way I found to make a list/grid scroll. I couldn't just drag a grid row or list option up and down to scroll the content. So, making fat scrollbars is another thing to consider.
>
>Thanks a lot.
>
> Hector


On touch screen systems you can simulate a right click by using the mouse down and mouse up events.

Instead of responding to the click event, use the mouseDown event and start a timer (note SECONDS(), for example). The timer starts when the mouse goes down and stops when the mouse goes up. If it is a short interval, then execute the "click event" code (which will be contained in a block inside the mouseUp event where the time interval is tested), and if it is a long interval call the right click event.

This make short and long presses equate to left and right clicks. Subclassing common controls to handle this automatically makes it easy to implement them everywhere.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform