Adding mnemonic to Button in C#

By [)ia6l0 iii

Use the ampersand symbol before the hotkey. For e.g If the button caption is "Click" and if you want "l" to be the hot key, Type "C&lick" in the Text property of the button. If you press Alt + L , the click event of the button will be fired.

Use the ampersand symbol before the hotkey. For e.g If the button caption is "Click" and if you want "l" to be the hot key,
Type "C&lick" in the Text property of the button.

If you press Alt + L , the click event of the button will be fired.

Related FAQs

Create properties in child windows form and access them.
Use the ColorTransalator to convert a html string or the color name to a valid Color object.
C# 4.0 provides us a new type of generics - Tuples
You can truncate the file paths using the Shell LightWeight library.
The IndexOf method in C# is case -sensitive. However, you can use the CompareInto class to make it insensitive to case.
Use the Environment class to get important and user-specific properties like the User Profile folder.
Adding mnemonic to Button in C#  (1344 Views)