L
L
lens23142021-11-09 20:12:09
C++ / C#
lens2314, 2021-11-09 20:12:09

How to intercept saved button from textBox1?

I have a pressed button recorded in textBox1, after clicking on button3, I want to listen to the pressed button that is in textBox1, but since textBox1 accepts string type variables, I had to translate the pressed key into string
That's what I'm talking about

if (Keys.A <= e.KeyCode && e.KeyCode <= Keys.Z)
            {//Character keys
                textBox1.Text = e.KeyCode.ToString();
            }

I could duplicate
if (Keys.A <= e.KeyCode && e.KeyCode <= Keys.Z)
в метод button3_KeyUp

but i need the key the user saved in textBox1
How to intercept the saved button from textBox1 ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lens2314, 2021-11-09
@lens2314

string keystring = textBox1.Text;
Keys keyspecial = (Keys)kc.ConvertFromString(keystring);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question