>When typing a new value, such as 1, into a blank text box that has an input mask like 9,999,999, an extra zero is added and the value becomes 10 instead 1. The extra zero only appears if I press TAB. When I press ENTER no extra zero appears.
>
>I have been searching at MS KB and I found that message number 191503 is related with my problem. The MS KB says this problem occurs only with VFP 5x. I am using VFP 8 and the problems is similar.
>
>Was not the problem solved? Is there a another way to workaround than MS KB indicate?
My solution for the problem was to remove the commas from .InputMask in textbox.gotfocus(), and restore it in .lostfocus(). I have added a .SavePicture property for that. It was back then in VFP5, and I actually kept it since - but then, it's a part of a framework which is not in use anymore, so I can't really say whether it solves the problem in VFP8, or whether the problem is still there at all. May work for you. Here's the code:
PROCEDURE GotFocus
With This
If "9,9" $ this.inputmask
.SavePicture=.InputMask
.selectonentry=.t.
.InputMask=Chrt(.InputMask, ",", "")
.refresh
endif
EndWith
ENDPROC
PROCEDURE LostFocus
With This
If !empty(.SavePicture)
.InputMask=.SavePicture
.savepicture=""
.refresh
endif
EndWith
ENDPROC