When i press a key at raed-only control, there is a error message say "The control is read-only".
How can i suppress this message?
Thanks Jimmy Le
nhan_tiags@yahoo.com
I, too, was annoyed by this, and here is how I fixed it.
Place this line in the control.keypress event:
NODEFAULT
While this control has the focus, the keyboard will not produce any effect whatsoever. Not quite what you wanted? Add this line above the NODEFAULT line:
if nKeyCode=9
return
endif
Now, if you press TAB, it will allow the key, any other key it will not. You can replace the number 9 with any other key code and even string them together with a bunch of 'OR's. For the list of key codes, look in the MSDN library for the INKEY() command.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.