From 67ca149fdb1db76416e1a2e4426056ae5a034c3e Mon Sep 17 00:00:00 2001 From: Russ Kollmansberger Date: Fri, 19 Jul 2024 08:38:09 -0500 Subject: [PATCH] Add ComboboxPropAndMethod.cs --- ComboboxPropAndMethod.cs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ComboboxPropAndMethod.cs diff --git a/ComboboxPropAndMethod.cs b/ComboboxPropAndMethod.cs new file mode 100644 index 0000000..73bdd33 --- /dev/null +++ b/ComboboxPropAndMethod.cs @@ -0,0 +1,6 @@ +// Changing Combobox text to Uppercase on KeyPress + +private void ComboBox_KeyPress(object sender, KeyPressEventArgs e) { + if (e.KeyChar >= 'a' && e.KeyChar <= 'z') + e.KeyChar -= (char)32; +} \ No newline at end of file