{RESOLVED} Uppercase at KeyPress Event
Hello,
I'd like to ask something about changing what we type into uppercase char. At the old VB version, I used to use below code :
[vbcode]
'I write below code at keypress event handler
Char = Chr(Keyascii)
Keyascii = Asc(Ucase(Char))
[/vbcode]
The code above will change every keypress of Char to Uppercase without having to press SHIFT and/or CAPSLOCK button.
And now, I'm using C#, and I want to make a similar code to my text object. How should I do that ?
Regards,
~WJ~
Re: Uppercase at KeyPress Event
In .NET the textbox control has character casing property you could set it to normal, lower and upper.
this.textBox1.CharacterCasing = CharacterCasing.Upper;
Re: Uppercase at KeyPress Event
Thanks Marzim,
It's work, and simpler than the old one in VB.
^_^
I guess it right, that .NET really make it simple in coding.
Regards,
~WJ~