Also, please let us know what version VB you're using...there's a HUGE difference between VBScript (.vbs) and VB.Net...
Main Topics
Browse All TopicsFor my own needs, I need a small application that would set the function keys to specific keystrokes:
F1 set to CTRL+U + CTRL+M
F2 set to CTRL+B + CTRL+M
F3 set to CTRL+F + CTRL+M
F4 set to CTRL+E + CTRL+M
F5 set to CTRL+V + V + + CTRL+M
F6 set to CTRL+W + CTRL+M
F7 set to CTRL+T + CTRL+M
This means that if I press F5, it should be like pressing CTRL+V, then the letter V, and then CTRL+M. How should I do that?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
THANK YOU indeed for your comment. In fact, I can use 2003 or 2005 versions of VB .NET, I just putted vb script in case I can solve this without compiling ..
Yes, as a fast solution, I would like to permanently change the behaviour of the function keys (well, it would be nice if I could reverse this later on in the future)
THANK YOU
Nick
You can use the global keyboard hooks and replace the e.keychar appropriately. Following articles are in C# but may be useful
http://www.codeproject.com
http://www.codeproject.com
I have a HookManager.dll that I use for global hooks. I can't share the source but you are welcome to use the dll. The dll is written in C#. It is available here http://ffxilinkshell.com/a
Usage is as follows below. I made a quick project that should do what you are asking
Business Accounts
Answer for Membership
by: bhmahlerPosted on 2009-10-22 at 10:58:29ID: 25637116
Do you want to achieve this in your application only or globally? If you want it globally you would need to use a low level keyboard hook and this would disable the function keys from any other action. If you want it only in your application you can set keypreview to true on your form and handle the KeyUp event. You could then send the appropriate keys when the selected function key was clicked. If you can clarify the method you are looking for, I can provide an example.