469,945 Members | 2,278 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

Using 'Function Keys' In vb.net

Could someone help:

I have been searching the web trying to figure out a way to use
function key's in my vb.net 2003 program (No luck!). What I would like
to do is enable the user to press (for example) F4 and have a search
dialog window come up. Or press 'Up' & 'Down' arrow's to toggle
between two radio buttons?
Thanks
Newbie

Feb 25 '06 #1
2 8580
Sorry people, this was a learning lesson for me. I used www.google.com
to search for everything I could think of to find info on using
function keys in vb.net 2003 and came up empty. But when I searched in
this news group I found exactly what I was looking for.

Please disregard the previous post

Thanks

Feb 25 '06 #2
"Newbie" <la******@charter.net> schrieb:
Sorry people, this was a learning lesson for me. I used www.google.com
to search for everything I could think of to find info on using
function keys in vb.net 2003 and came up empty. But when I searched in
this news group I found exactly what I was looking for.

For completeness:

There are basically two solutions:

Add a mainmenu control to the form and create menu items. Assign shortcuts
to the menu items and handle the items' 'Click' events. Note that the menu
items and the menu bar do not need to be visible to make the accelerator
keys work.

- or -

Set the form's 'KeyPreview' property to 'True' and check 'e.KeyCode' in the
form's 'KeyDown' event handler.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Michael Sparks | last post: by
2 posts views Thread by Hasan Ammar | last post: by
7 posts views Thread by pfa | last post: by
4 posts views Thread by Broeisi | last post: by
5 posts views Thread by R | last post: by
14 posts views Thread by raylopez99 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.