Hi,
The notify icon responds to a Mouse click event. Examples:
MouseDown
Mouseup
Doubleclick
Click
If I Want it with a Key Combination, Like [shift] + Doubleclick, how do I do This?
Printable View
Hi,
The notify icon responds to a Mouse click event. Examples:
MouseDown
Mouseup
Doubleclick
Click
If I Want it with a Key Combination, Like [shift] + Doubleclick, how do I do This?
That would imply that you have a way to give the icon Focus. To my knowledge this is not possible with the standard NotifyIcon class. If something does not have focus then it will not respond to keyboard events (and this class doesn't have the normal keyboard event handlers anyway).
You'd have to come up with a way of globally scanning the keyboard states in another process or by using a timer.
In short, you can't. Unless you go out of your way to modify the NotifyIcon class.
Couldnt you also use the RegisterHotkey API?
Not Focus, It would be a normal Notify Icon, Responds to Clciks, If one Clicks Once, then it checks if shift is also pressed, then Execute code, else end Sub.Quote:
Originally Posted by wossname
Something like that should be possible.
I dont think so since in order to respond to those events, like wossname stated, the notify icon needs to have the focus.
What Was Your Eariler Option On Hotkeys?
I'm Thinking Like This: Of A Notify Icon Is In The Taskbar, When You Click It, Then It Gets Focus. Thats How Come You Can Say Maxamize A Window Within That Sub For Example.
So Can One In That Same Sub Do A Check To Check If The Shift Key Is Pressed To Then Make It Exec. Some Code. It Is In Focus Aint It?
Sorry If I Asked So Many Time, I Still Think Its In Focus If It Goes Through A Sub.
I Got This Idea From A Program Deepfreeze. It Needs A Double Click With The Shift Key Down To Activate The Program Again. That Or Pressing Shift+alt+ctrl, Then F7.
On second thoughts you could always use GetKeyState() API function to find out if either of the shifts are held down. Use API-Guide to find out details of parameters and so on.
Use API-Guide ....
Is this a Site or a Manual. What is API, Appplication Programming Instruction is my Guess.
API-Guide is a freeware program. Google for "Download API guide".
The Win32 API is a large number of subs and functions that let you control many different low-level system features, features not accessible though normal code.
Its a large topic but its straightforward once you get the jist of it. API stand for Application Programming Interface.
VBF has an API forum too, so you should post your API questions there :)