Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

[ once4ever ]
Posted

Hi Hamid,

 

 

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! ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...