Hi,
In a particular textbox on a form, I need to have whatever is typed converted to uppercase with some exceptions.
So I need a way of converting the keypresses as I cannot just use a blanket convert to uppercase as there are a few which need to remain lowercase.
My thinking is that I would use the textbox KeyPress event and convert any ASCIIKeys between 'a' and 'z' to 'A' and 'Z' respectively. The issue is that I need, on occasion to use the shift key to essentially convert back to lowercase regardless of caps lock.
So, in brief I need to ignore caps lock and ensure that any lower case alphabetic character is converted to uppercase until the shift key is held down in which all alphabetic characters are lowercase.
The KeyPress function does not allow for the detection of the shift key so my question is how can I achieve this?
Has anyone had to do this before?
Thanks
In a particular textbox on a form, I need to have whatever is typed converted to uppercase with some exceptions.
So I need a way of converting the keypresses as I cannot just use a blanket convert to uppercase as there are a few which need to remain lowercase.
My thinking is that I would use the textbox KeyPress event and convert any ASCIIKeys between 'a' and 'z' to 'A' and 'Z' respectively. The issue is that I need, on occasion to use the shift key to essentially convert back to lowercase regardless of caps lock.
So, in brief I need to ignore caps lock and ensure that any lower case alphabetic character is converted to uppercase until the shift key is held down in which all alphabetic characters are lowercase.
The KeyPress function does not allow for the detection of the shift key so my question is how can I achieve this?
Has anyone had to do this before?
Thanks