cleaning keyboard buffer - how?
Hi,
I am using a select case statment in a key press event to know when a the "." is pressed.
When the "." is pressed - the app will do several rutines.
All works fine - only - it turns out that the actual ploting of the "." on the screen will accur only when exiting from the keypress event - and that brings a problem -
At that stage (when exiting from the keypress event) i dont need the ploting of the "." (it is plotted by one of the rutines in the select case options - and not as the last action eather - so i cant just leave it to be done by exiting the keypress event) - furthermore, this ploting of the "." will change the selstart and will triger the textchange event (i understand why - but dont wont it) whitch is not good for me.
So my question is - is there a why to clean the the keyboard buffer just before getting out the the keypress event - or - i will apreciate any other good pointer to how to solve this specific problem.
Thanks
Dani
Re: cleaning keyboard buffer - how?
You can set the KeyAscii value passed to the _kepPress event to zero to clear it and also you need to do the same in KeyUp Event too
private sub text1_keyPress(keyascii as integer)
.... do things
keyAscii = 0
end sub
private sub Text1_KeyUp(Kecode as integer ...)
if keycode = Asc(".") then keyCode = 0
end sub
RK