H
Hal Gibson
Because of a legacy (originally DOS) Sub
Procedure "AlphaInput" that is called in thousands of
places in our code, I need to be able to set a
variable, "KeyedString",to the value of TextBox.Text
(KeyedString originally was set by tracking each
individual key pressed, independently of textbox.text)
Since we're setting KeyedString during the keypress
event, Textbox.Text is always one character behind.
That's OK if the user presses <Enter> or <Tab> after the
last printable character is keyed, because this causes
another trip through Alphainput after that last character
has appeared in the TextBox.
If the user causes the TextBox to lose focus without
pressing <Enter> or <Tab> - say by clicking a Command
Button - the final alphainput isn't triggered, and
KeyedString ends up missing the last printable character
entered.
I'm wondering if there is some way to capture the
anticipated TextBox.Text string during the Keypress event
before the final character displays in the textbox,
perhaps some property I've missed?
Procedure "AlphaInput" that is called in thousands of
places in our code, I need to be able to set a
variable, "KeyedString",to the value of TextBox.Text
(KeyedString originally was set by tracking each
individual key pressed, independently of textbox.text)
Since we're setting KeyedString during the keypress
event, Textbox.Text is always one character behind.
That's OK if the user presses <Enter> or <Tab> after the
last printable character is keyed, because this causes
another trip through Alphainput after that last character
has appeared in the TextBox.
If the user causes the TextBox to lose focus without
pressing <Enter> or <Tab> - say by clicking a Command
Button - the final alphainput isn't triggered, and
KeyedString ends up missing the last printable character
entered.
I'm wondering if there is some way to capture the
anticipated TextBox.Text string during the Keypress event
before the final character displays in the textbox,
perhaps some property I've missed?