Hi,
I need to clear the keyboard buffer in VB. Here's what Im doing:
1. A magnetic stripe reader is passing a stream of characters to a textbox via the keyboard, with carraige returns as the end of track markers.
2. I look for the end of track marker and process.
I never know what number of tracks are coming in, and I only need to process the first 2, and so want to clear the incoming keyboard buffer once I have processed what I need. This may be the first part of the stream or all of it. The problem is there is no end of stream marker I can use, so I never know when the entire stream has been received by the textbox so I can begin processing. Therefore I process the first 2 tracks and any remaining characters are held in the keyboard buffer until the form receives focus again. I want to delete these from the keyboard buffer before the form gets focus and receives these unwanted characters!
I need to clear the keyboard buffer in VB. Here's what Im doing:
1. A magnetic stripe reader is passing a stream of characters to a textbox via the keyboard, with carraige returns as the end of track markers.
2. I look for the end of track marker and process.
I never know what number of tracks are coming in, and I only need to process the first 2, and so want to clear the incoming keyboard buffer once I have processed what I need. This may be the first part of the stream or all of it. The problem is there is no end of stream marker I can use, so I never know when the entire stream has been received by the textbox so I can begin processing. Therefore I process the first 2 tracks and any remaining characters are held in the keyboard buffer until the form receives focus again. I want to delete these from the keyboard buffer before the form gets focus and receives these unwanted characters!