Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Detecting system events

Detecting system events

Scheduled Pinned Locked Moved Visual Basic
csshelptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brett Peirce
    wrote on last edited by
    #1

    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.

    C B 2 Replies Last reply
    0
    • B Brett Peirce

      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.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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++

      1 Reply Last reply
      0
      • B Brett Peirce

        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.

        B Offline
        B Offline
        Briga
        wrote on last edited by
        #3

        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?)?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups