Board index » Visual Studio » Space key + menu operation

Space key + menu operation

Visual Studio226
Hi,

I wanted to operate the menu selection via space key from the keyboard.

How would I do that?

For Ex. If we select the Menu File->Open. If we hit the Enter key on

Open menu it opens File Dialog. I wanted to do the same operation on

space key.



Help is apperaciated.



Thanks and Regards,

Rajkumar Narkhede


-
 

Re:Space key + menu operation

You could add it as an accelerator in the table and have it handle the same

message as the File/Open menu handles. I think something like Ctrl+O is

default for this operation.



Tom



<rajkumar.narkhede@gmail.com>wrote in message

Quote
Hi,

I wanted to operate the menu selection via space key from the keyboard.

How would I do that?

For Ex. If we select the Menu File->Open. If we hit the Enter key on

Open menu it opens File Dialog. I wanted to do the same operation on

space key.



Help is apperaciated.



Thanks and Regards,

Rajkumar Narkhede





-

Re:Space key + menu operation

Hi Tom,

I wanted space key to be operated for every menu item and I think we

are in position to set the one accelrator for one id only. Also I check

the message for space key in spy . Whenever we pressed the space key on

menu it always goes into the OnEnterIdle.

I am not in position to capture the space key event in

PreTranslateMessage too for menu items.

if u had any other idea let me know.....





Tom Serface wrote:

Quote
You could add it as an accelerator in the table and have it handle the same

message as the File/Open menu handles. I think something like Ctrl+O is

default for this operation.



Tom



<rajkumar.narkhede@gmail.com>wrote in message

news:1168930615.207041.246470@a75g2000cwd.googlegroups.com...

>Hi,

>I wanted to operate the menu selection via space key from the keyboard.

>How would I do that?

>For Ex. If we select the Menu File->Open. If we hit the Enter key on

>Open menu it opens File Dialog. I wanted to do the same operation on

>space key.

>

>Help is apperaciated.

>

>Thanks and Regards,

>Rajkumar Narkhede

>



-