Windows Forms Shortcut keys

Wael Sedky 81 Reputation points
2023-05-02T23:11:18.5933333+00:00

In the past I used to have &File to refer to file menu with an underscore below the F. This would allow me to access the menu easily without using the mouse. I setup my menu this way and I have underscores in the places I want, but when I run the app. They are not displayed and I have to click the menu to open it. I didn't have to write any code before. I am using the menustrip object.

Developer technologies | Windows Forms
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-05-12T09:06:06.16+00:00

    Hi @Wael Sedky ,

    After you use ALT+F to open the menu, you only need to press the corresponding letter key to trigger the bound event.

    In your example press ALT+F to open the file menu, then just press N or O or E to trigger the corresponding option.

    Running without underlining will have no effect.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.