Detecting system events
-
I know generally how to raise and detect/handle events in my own programs, but how does one detect system events? I can't imagine there aren't events raised when someone selects a start menu item, much less something like a system error or a new usb device being inserted. anyone have a few hints where to start looking for things like this? and what about making my programs raise system-wide events? are all events system-wide(if they are public that is)? thanks to anyone with this info.
sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.
-
I know generally how to raise and detect/handle events in my own programs, but how does one detect system events? I can't imagine there aren't events raised when someone selects a start menu item, much less something like a system error or a new usb device being inserted. anyone have a few hints where to start looking for things like this? and what about making my programs raise system-wide events? are all events system-wide(if they are public that is)? thanks to anyone with this info.
sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.
There are code samples for HID/USB events around. A start menu item, I'm not so sure of, but you can write global hooks for global events, in C++ at least. Christian Graus - Microsoft MVP - C++
-
I know generally how to raise and detect/handle events in my own programs, but how does one detect system events? I can't imagine there aren't events raised when someone selects a start menu item, much less something like a system error or a new usb device being inserted. anyone have a few hints where to start looking for things like this? and what about making my programs raise system-wide events? are all events system-wide(if they are public that is)? thanks to anyone with this info.
sincerely, Brett Peirce - PolerBear To err is human; To forgive: divine.
Lot of stuff all together. There are classes in the .NET Framework you can use to get some system events (i.e. FileSystemWatcher, ...) Others, like USB or PCMCIA insertion have some sample code around here (as stated in previous reply) I don't believe a there's a system event for a start menu selection. Only way could be to get all the system msg but I guess you need to use something different than VB.NET (I may be wrong). To generate system event is a slightly diffent, and depends on what do you mean. Create "fake" events? Notify every task of something (or only some "listening" tasks?)?