Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keyboard buffer 1

Status
Not open for further replies.

delphidestructor

Programmer
Oct 20, 2000
67
Can anyone tell me a quick and easy way to flush the keyboard buffer without having to make a low level call or calling a dll. I am prompting with a, recursively called, yes - no message box and I do not want the user to be able to accidentally hit the space bar or enter twice. I want to flush the keyboard input just before the prompt is called for, so input would only be accepted after the message box is visible. Thanks for any help. Mike
 
If you're using another form for this prompt, then just before displaying the form, clear out whatever is in the fields.

Private Sub Form_Activate()
DoEvents
Text1.Text = ""
End Sub

The DoEvents will take the data in the keyboard, load it into the field, you'll erase the field and then the form will be displayed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top