I have a reastaurant programm with touch interface.
I use BTNBMP to drow the buttons.
If the user wishes to charge , for example two coffe , the user presses the same butoon twice.
If the user presses the same button to quickly , the programm will charge only one coffee.
There is a waiting period before the same button can be pressed again .
I have noted that if I use BUTTONS , this problem does not arise , but I don't want to lose the graphics and colours of BTNBMP
This is a sample , if you press quickly twice on the button 'Count' , the number increases by one
- Code: Select all Expand view
#include "FiveWin.ch"
function Main()
local oDlg ,oSay , n := 0
DEFINE DIALOG oDlg SIZE 370, 400
@ 1, 1 SAY oSay VAR n COLOR CLR_HRED OF oDlg
@ 11, 138 BTNBMP OF oDlg SIZE 40, 15 PIXEL 2007 NOBORDER ;
PROMPT " &Clear " LEFT ;
ACTION n := 0 ,oSay:Refresh()
@ 100, 2 BTNBMP OF oDlg SIZE 180, 18 PIXEL 2007 NOBORDER PROMPT " COUNT" ;
LEFT ;
ACTION n++ ,oSay:Refresh()
ACTIVATE DIALOG oDlg CENTERED
return nil
Regards
Maurizio
http://www.nipeservice.com