J
John S
I have an event handler tied to a text box keypress event. All I am trying
to do is have it read the key and return it in upper case. Because the
event doesn't return anything, I cannot use the keyword "return". I thought
I could do it this way.
Here is the code.
public static void uCaseReturn(object sender,
System.Windows.Forms.KeyPressEventArgs e){
TextBox tb = (TextBox) sender;
string tb1 = tb.Text.ToUpper();
tb.Text=tb1;
}
to do is have it read the key and return it in upper case. Because the
event doesn't return anything, I cannot use the keyword "return". I thought
I could do it this way.
Here is the code.
public static void uCaseReturn(object sender,
System.Windows.Forms.KeyPressEventArgs e){
TextBox tb = (TextBox) sender;
string tb1 = tb.Text.ToUpper();
tb.Text=tb1;
}