i have a MDI app and i want select firs item of mainMenu at starup application that when user run application he can use mainMenu items by Enter or arrow keys.
i checked PerformSelect() and PerformClick but did not work az i want
If you prefix the appropriate letter of the menu with an ampersand you can send the keystrokes to call this menu. For instance, if your menu is File prefix with '&' (&File). The name then appears File.
Now use the following: System.Windows.Forms.SendKeys.Send("%F")
...to call up the menu. Your cursor should be positioned on the first entry in the list.
Paul.
PS: It's a down and dirty way of doing it, though!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.