First post, by ncmark
Does anyone here have any experience with detecting a keypress in visual basic?
Be forewarned.... I am using an older version (version 4)
I had a form set up like a mini-excel spreadsheet,,,, textboxes to enter data and a scroll bar. What I *wanted* was for the user to enter numerical data and press return. But windows insists on playing a "ding" every time the return key is pressed. That method also had the disadvantage of not disallowing character input.
So then I decided to do the whole thing myself - use label boxes instead of textboxes and handle it all from the form keypress event. But then I ran across a new problem - it would seem that the form keypress event is not read if there any objects on the form capable of detecting a keypress
I think I have a workaround.... as soon as a user clicks on a label box, then then all scroll bars and command buttons are disabled, at which point the FORMs keypress code becomes active. They are then re-enabled after a return keypress,
Seems like a convoluted way to do it. Does anyone have any suggestions? Thanks!