I have a menu with menuitem "Delete".
I want to reuse the functionality of the DELETE key on
the keyboard. How can I do this in a menuitem? What does
the VB code look like?

I would like to create menuitems for copy and paste as
well (reuse windows functionality ctrl+C and ctrl+V??),
and have no idea on how to reuse. Please point me in the
right direction.

Regards

Tore

Re: Simple question on menuitem by hirf-spam-me-here

hirf-spam-me-here
Thu Jan 08 12:10:28 CST 2004

* "Tore Gylver" <nospam@tgylnospam.no> scripsit:
> I have a menu with menuitem "Delete".
> I want to reuse the functionality of the DELETE key on
> the keyboard. How can I do this in a menuitem? What does
> the VB code look like?
>
> I would like to create menuitems for copy and paste as
> well (reuse windows functionality ctrl+C and ctrl+V??),
> and have no idea on how to reuse. Please point me in the
> right direction.

Have a look at the 'SendKeys' class and its 'Send' method.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

RE: Simple question on menuitem by v-yiy

v-yiy
Fri Jan 09 02:14:42 CST 2004

Hi Tore,

Do you mean you want to use "Del" key as the shortcut key of the "Delete"
Item?

If my understanding is correct, you may select the menuitem and set the
shortcut key in property "ShortCut" in the PropertyGrid.
Does it solve your problem?
Please be free to reply this thread, if this issue is not solved.

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, "online" should be removed before
sending.