Connecting Tech Pros Worldwide Forums | Help | Site Map

how to backspace?

Newbie
 
Join Date: Nov 2008
Posts: 2
#1: Nov 17 '08
Hi, im doing a currency convertor program. I've done up most of the parts, but im not sure how to backspace. For example of user entered wrong number, when the user click on backspace, it'll delete the last number he entered.

thanks

joedeene's Avatar
Site Addict
 
Join Date: Jul 2008
Location: US of A
Posts: 587
#2: Nov 17 '08

re: how to backspace?


Isn't that what backspace is suppose to do, delete the last entered character? What do you want the backspace to do?

joedeene
Newbie
 
Join Date: Nov 2008
Posts: 2
#3: Nov 17 '08

re: how to backspace?


sorry to cause the misunderstanding. what i meant was if user click on backspace, how should i put the code to let the backspace button delete the last number the user entered.
joedeene's Avatar
Site Addict
 
Join Date: Jul 2008
Location: US of A
Posts: 587
#4: Nov 17 '08

re: how to backspace?


What have you got so far? Like, what is your program doing. I suppose you're using a text box. Are you converting the user's input from one currency to another currency in another text box? Or are you using the same text box to convert the text.

I still don't quite understand why the backspace isn't working. If you're converting the input into another different text box and leaving the input alone, and that text box, which contains the input, has focus, it should definitely delete the last entered character, unless you are coding with a textbox_textchanged event. Also, what language are you coding in?

joedeene
balabaster's Avatar
Moderator
 
Join Date: Mar 2007
Location: Canada
Posts: 757
#5: Nov 17 '08

re: how to backspace?


So you're looking for the .NET equivalent of SendKeys(backspace)?

http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx
lotus18's Avatar
Site Addict
 
Join Date: Nov 2007
Location: Zamboanga City, Philippines
Posts: 860
#6: Nov 18 '08

re: how to backspace?


Hi

Why don't you create a validation that will prevent the user to enter wrong number?


Rey Sean
Reply