G
Guest
Hi all,
I've been struggling with this problem for quite a while, and have searched
the internet many times, and tried many of the ideas which that turned up -
but haven't managed to get this to work!
Basically, my application receives serial messages from another system. If a
certain field is set to true in the status message then the application must
not let the user do anything using the keyboard. As in the application must
ignore all key events in all possible ways - none of the code in any KeyUp,
KeyDown or KeyPress events should execute, and all controls should ignore
keys (ie. if the focus is on a text box, then the text box must not allow the
user to add any text, and the same for any other controls). When the field is
changes back to false then the application should return to normal.
Basically, what I am looking for is a way to stop the application getting
any key events whatsoever. Is this possible? If so, what is the best (or
only?) way to do it?
I have struggled with such things as e->SupressKeyPress (which didn't seem
to work at all), PreFilterMessage, PreProcessMessage and haven't managed to
get anything to work!
If anyone has any ideas at all, I would be very grateful to hear them!
Cheers,
Robin
I've been struggling with this problem for quite a while, and have searched
the internet many times, and tried many of the ideas which that turned up -
but haven't managed to get this to work!
Basically, my application receives serial messages from another system. If a
certain field is set to true in the status message then the application must
not let the user do anything using the keyboard. As in the application must
ignore all key events in all possible ways - none of the code in any KeyUp,
KeyDown or KeyPress events should execute, and all controls should ignore
keys (ie. if the focus is on a text box, then the text box must not allow the
user to add any text, and the same for any other controls). When the field is
changes back to false then the application should return to normal.
Basically, what I am looking for is a way to stop the application getting
any key events whatsoever. Is this possible? If so, what is the best (or
only?) way to do it?
I have struggled with such things as e->SupressKeyPress (which didn't seem
to work at all), PreFilterMessage, PreProcessMessage and haven't managed to
get anything to work!
If anyone has any ideas at all, I would be very grateful to hear them!
Cheers,
Robin