Assign Hotkey

alehawk
08-31-2003, 11:33 PM
Hi!
Is there a way to make a VB App that executes commands in other apps?
Example: I want to configure Z & X keys to send IE to got BACK and FRW... or O key to open a new document in word...
If there a way to do something like that?
Tnx!

Squishy
09-01-2003, 07:38 PM
You can use RegisterHotKey and UnregisterHotKey to assign system-wide hotkeys. To get IE to go back or forward, you can probably assume that IE will have focus (use GetForegroundWindow to check). Just send ALT-Left Arrow to go back, and ALT-Right Arrow to go forward. To have the browser go back or forward even if it doesn't have focus will take some work, since there may be multiple windows open. To open a word document, just use ShellExecute.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum