Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 To: Samir H.
  Where is Samir H.?
 Yogyakarta
 Indonesia
 Samir H.
 Tags
Subject: RE: Keyboard manipulation
Thread ID: 345228 Message ID: 345490 # Views: 39 # Ratings: 0
Version: Visual FoxPro 6 Category: Forms
Date: Wednesday, May 23, 2012 8:22:44 PM         
   


> > Dear all,
> >
> > Sorry for didn't mention clearly the problem in my previous thread.
> >
> > What i mean is how to manipulate the keyboard when user press '0' value it will be automatically add another '0' behind the '0' user pressed.
> >
> > What i try to achieve is when the Cashier must input the paid amount she/he didnt have to press too many '0' value.
> >
> > lets say the amount paid is '10.000' cashier no need to press the '0' value 4 times but only 2 times.
> >
> > I have one textbox control named TxtAmountPaid, please give the code for the control.
> >
> > i hope its clear now and thank in advance for the help
>
> I wouldn't bother to manipulate zeros that way. Let the cashier type the 4 zeros. If the amount is 100.000, how will the cashier type that if you double all zeros? Or 10.500?
>
> Regards
> Samir

@Sammy: 10.500 ? that's hard ! but he could post a request for us to help him change A into single 0
reason: you don't need the A anyway... hahahaha

or

Why not just use the buttons that ARE THERE IN NUMBERS-KEYPAD BUT NORMALLY UNUSED, such as the: / , * AND -, TO FORCE '00', AND '000' AND '0000', FOR EXAMPLE:
(in keypress event of the textbox control)
DO CASE
CASE nKeyCode = 47 && "/" is pressed
KEYBOARD '{BACKSPACE]'+'00'
CASE nKeyCode = 45 && "-" is pressed
KEYBOARD '{BACKSPACE]'+'000'
CASE nKeyCode = 42 && "*" is pressed
KEYBOARD '{BACKSPACE]'+'0000'
ENDCASE

ENTIRE THREAD

Keyboard manipulation Posted by marulam acong @ 5/21/2012 5:16:27 AM
RE: Keyboard manipulation Posted by onytoo @ 5/21/2012 12:52:16 PM
RE: Keyboard manipulation Posted by marulam acong @ 5/22/2012 11:51:05 AM
RE: Keyboard manipulation Posted by Jun Tangunan @ 5/24/2012 5:18:08 AM
RE: Keyboard manipulation Posted by David Mustakim @ 5/23/2012 8:17:08 PM
RE: Keyboard manipulation Posted by Cetin Basoz @ 5/21/2012 1:02:27 PM
RE: Keyboard manipulation Posted by Tamar Granor @ 5/21/2012 10:22:16 PM
RE: Keyboard manipulation Posted by marulam acong @ 5/22/2012 11:46:25 AM
RE: Keyboard manipulation Posted by Samir H. @ 5/22/2012 4:46:48 PM
RE: Keyboard manipulation Posted by marulam acong @ 5/22/2012 5:55:23 PM
RE: Keyboard manipulation Posted by onytoo @ 5/22/2012 6:32:53 PM
RE: Keyboard manipulation Posted by Muhammad Majid Ali Attari @ 5/24/2012 7:38:59 AM
RE: Keyboard manipulation Posted by David Mustakim @ 5/23/2012 8:22:44 PM
RE: Keyboard manipulation Posted by onytoo @ 5/24/2012 2:58:21 AM
RE: Keyboard manipulation Posted by marulam acong @ 5/22/2012 12:16:01 PM
RE: Keyboard manipulation Posted by David Mustakim @ 5/24/2012 7:20:34 AM
RE: Keyboard manipulation Posted by David Mustakim @ 5/30/2012 11:31:20 AM
RE: Keyboard manipulation Posted by onytoo @ 5/30/2012 3:57:13 PM