Shortcut Key From Anywhere in Win95? 
Author Message
 Shortcut Key From Anywhere in Win95?

Using VB5 Pro:

I'm trying to write a program that would basically stay minimized in
the system tray but would do its "thing" whenever the user hit a
shortcut key combination (say, CTRL-ALT-M).  I'd like the user to be
able do this when any application is active, i.e. from anywhere in
Windows 95.

My original idea was to have this action be part of a menu, then
assign the appropriate key combination to that menu item, but IIRC
that won't work when the program's minimized.

Help!

TIA,

Brent P. Newhall
"Education never ceases."



Thu, 13 Jul 2000 03:00:00 GMT  
 Shortcut Key From Anywhere in Win95?

Think the best bet would be to use a subclassing hook to intercept keyboard
messages. Somewhat complex, but it's the only way you'd be able to get
notified WHATEVER app was active.

Good luck!

Quote:

>Using VB5 Pro:

>I'm trying to write a program that would basically stay minimized in
>the system tray but would do its "thing" whenever the user hit a
>shortcut key combination (say, CTRL-ALT-M).  I'd like the user to be
>able do this when any application is active, i.e. from anywhere in
>Windows 95.

>My original idea was to have this action be part of a menu, then
>assign the appropriate key combination to that menu item, but IIRC
>that won't work when the program's minimized.

>Help!

>TIA,

>Brent P. Newhall
>"Education never ceases."



Thu, 13 Jul 2000 03:00:00 GMT  
 Shortcut Key From Anywhere in Win95?

Hi Kevin,

Do you know of a book/guide/WWW site that might be able to help with
this detecting of keypresses/subclassing?

Chris.



Quote:
>Think the best bet would be to use a subclassing hook to intercept keyboard
>messages. Somewhat complex, but it's the only way you'd be able to get
>notified WHATEVER app was active.

>Good luck!


>>Using VB5 Pro:

>>I'm trying to write a program that would basically stay minimized in
>>the system tray but would do its "thing" whenever the user hit a
>>shortcut key combination (say, CTRL-ALT-M).  I'd like the user to be
>>able do this when any application is active, i.e. from anywhere in
>>Windows 95.

>>My original idea was to have this action be part of a menu, then
>>assign the appropriate key combination to that menu item, but IIRC
>>that won't work when the program's minimized.

>>Help!

>>TIA,

>>Brent P. Newhall
>>"Education never ceases."



Fri, 14 Jul 2000 03:00:00 GMT  
 Shortcut Key From Anywhere in Win95?

Quote:

> Using VB5 Pro:

> I'm trying to write a program that would basically stay minimized in
> the system tray but would do its "thing" whenever the user hit a
> shortcut key combination (say, CTRL-ALT-M).  I'd like the user to be
> able do this when any application is active, i.e. from anywhere in
> Windows 95.

The only way I know of that can do is to compile the project and make a link for
it, then right-click the link and choose properties.  In the "Shortcut Key"
textbox, type M and it will add the Ctrl-Alt.

Quote:
> My original idea was to have this action be part of a menu, then
> assign the appropriate key combination to that menu item, but IIRC
> that won't work when the program's minimized.

I wouldn't try assigning a key combination to an additional menu.  This might
seriously mess up some programs that want absolute control over their menus and
shortcuts (Office 97-based programs, for ex. which use those spiffy iconized
menus)  If you assign two shortcut keys, you can get very weird effects in some
menus.  Also, the user could have an existing Ctrl-Alt-M shortcut set up like I
described above.

My suggestion would be to simply have your program run on the system menu and be
called as required.

Quote:
> Help!

> TIA,

> Brent P. Newhall
> "Education never ceases."

--
Jim Barlow
ICQ: 6428532
------------
Ignore this if you are not a junk email sender.

WARNING: ALL SPAMMERS OR SENDERS OF JUNK EMAIL WILL
PROSECUTED TO THE MAXIMUM EXTENT PERMISSIBLE BY
LAW. SO DON'T SEND YOUR TRASH, _PLEASE!_

Thank you for ignoring the above.
------------



Sun, 16 Jul 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. HELP: Menu with shortcut key fails on Win95

2. Disable win95 shortcut keys?

3. WebBrowser control shortcut keys & function keys

4. WebBrowser control shortcut keys & function keys

5. Key press from anywhere

6. Detecting key pressess anywhere

7. Trapping numeric keys anywhere on a form

8. Responding to Key events anywhere from within program manager

9. How to get and trap keys anywhere in Windows

10. Win95/NT Shortcuts

11. Win95 shortcuts won't open

12. get win95 shortcut's path

 

 
Powered by phpBB® Forum Software