the menu and the shortcuts

  • Thread starter Thread starter Dominique Gratpain
  • Start date Start date
D

Dominique Gratpain

Hi,

Two questions about menu and shortcuts (in WindowsForms) :

1) I create a main menu with two items in menu bar : &menu 1 and
m&enu 2
I see the accelarator key (m underline for menu 1 and e underline for
menu 2) only if i strike the alt key.
If I don't use alt key, never i see these accelerator keys.
Is it possible to see these accelerator key without to strike alt key ?
I tries to use a : SendKeys.send("%") but I think it is not possible to
send only Alt but always Alt+other character (ex: "%{A} == ALT+A).
Has anybody a solution ?

2) I use also Ctrl+letter as shortcut in menu items.
If the menu is not active, the shortcut works well, but if the menu is
active, never the shortcut runs even if I see the menu and the word
CTRL+A (for example). I think it is not normal to display Ctrl+A and
Ctrl and A doesn't work.

Thanks in advance

Dominique
 
Dominique Gratpain said:
1) I create a main menu with two items in menu bar : &menu 1 and
m&enu 2
I see the accelarator key (m underline for menu 1 and e underline for
menu 2) only if i strike the alt key.
If I don't use alt key, never i see these accelerator keys.
Is it possible to see these accelerator key without to strike alt key ?
I tries to use a : SendKeys.send("%") but I think it is not possible to
send only Alt but always Alt+other character (ex: "%{A} == ALT+A).
Has anybody a solution ?

Showing the keyboard navigation indicators
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=showaccelerators&lang=en>
 
Herfried : many thanks for your answer and for your website, it will
help me

Tom : thanks to not berate me but i am sorry if windows doesn’t do well
its job even since 6 years. I am an old developper who uses many times
PDS Basic 7.1 in DOS and with Dos, i could do what i want and i have not
these problems. Herfried's article is about Win 2000 and i use Win 2000.
His article solves my problem.
Perharps, do you have a solution for the question 2 instead of criticize
?

Dominique
 
Herfried : many thanks for your answer and for your website, it will
help me

Tom : thanks to not berate me but i am sorry if windows doesn’t do well
its job even since 6 years. I am an old developper who uses many times
PDS Basic 7.1 in DOS and with Dos, i could do what i want and i have not
these problems. Herfried's article is about Win 2000 and i use Win 2000.
His article solves my problem.
Perharps, do you have a solution for the question 2 instead of criticize
?

Dominique

Dominique - I'm sorry if I offended you. It was never my intention.
It's just that this has been a fairly frequent question over the years...
I just found it slightly amusing that this question still comes up.
Again, I'm sorry...
 
no problem, Tom

but if you have an answer to my question 2, it will be well

Best Regards

Dominique
 
no problem, Tom

but if you have an answer to my question 2, it will be well

Best Regards

Dominique

Dominique... I'm sorry, but I don't quite understand the question. Can
you try and ask it one more time? I'll see if I can help :)
 
Hi Tom,

Sorry, i am late to answer, yesterday I went to DevDays in Paris (2200
developpers in a big warehouse) : good news, good show .. and good
lunch.

Here details about my question :

In WindowForms, in a new project, I put a mainmenu with 2 items on the
menu bar : menu 1 and menu 2.
Under menu 1, I create menu 1 1 and menu 1 2 and I add shortcut : CtlA
for menu 1 1 and CtlB for menu 1 2

Under menu 2, I create menu 2 1 and menu 2 2 and I add shortcut : CtlC
for menu 2 1 and CtlD for menu 2 2

Then I add to see then menu choosen :

Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem3.Click, MenuItem4.Click,
MenuItem5.Click, MenuItem6.Click
MessageBox.Show("choose : " + sender.text)
End Sub

Then I run the project.
If i strike on Ctl + A, it is OK (also for Ctl + B ..).

Then I open a menu with the mouse, i see : menu 1 1 Ctrl+A and
Menu 1 2 Ctrl+B.

But now if i strike on Ctrl+A or Ctrl+B or Ctrl+C or Ctrl+D, nothing
appears, no menuitem is choosen.
I think it is not normal. We see the words : Ctrl+A but it doesn't run.
It is good only if the menu isn't activated.

I have the same problem with Win 2000 and Win XP.

What’s happen ??

Thanks

Dominique
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top