Windows Forms Shortcut keys

Wael Sedky 61 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.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,886 questions
C#
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.
10,874 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jiale Xue - MSFT 44,841 Reputation points Microsoft Vendor
    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 Answers by the question author, which helps users to know the answer solved the author's problem.