I do not want the user to be able to change the value displayed in the combobox. I have been using Enabled = false but it grays out the text, so it is not very
Enabled = false
Simplest way in code:
instead of adding methods for KeyPress or KeyDown, add this code on 'Form1_Load' method:
KeyPress
KeyDown
Form1_Load
comboBox1.KeyPress += (sndr, eva) => eva.Handled = true;
or
comboBox1.KeyDown += (sndr, eva) => eva.SuppressKeyPress = true;
(sndr, eva) is for (object sender, EventArgs e)
(sndr, eva)
(object sender, EventArgs e)