Relative Content

Tag Archive for c#formswinformshotkeys

C# Select Hotkey with a Button

basically i’m trying to let user select a key for a function. We will have only one button,what i am trying to do is when user clicks that button, capture the first button user clicked and write it to buttontext(and use that key in the future). With the current code, when i open the form it updates the text to No Hotkey. And when i click it, it changes the text to Select a hotkey… But after that it doesnt change the text even if i press any button. What am i doing wrong here? (button1.ButtonText is deafult for me so its not button1.Text)