I couldn't find info anywhere around and im a bit curious, from C# where you have all nice buttons and classes and events to do all you please, im wondering how is this really implemented in a low level scenario. For example if i click on a point in the screen, whats algorythm used to detect which control was pressed, what action was done, which events fire and so on. Im guessing this is all depends on the OS and its api.

Just in case its not clear, i would like to know the event chain from where the mouse click or move interrupt is done from the device to the CPU, to where the event is fired in my C# code :)

  • 1
    This question appears to be off-topic because it is about the functionality of a piece of software and not an actual problem being faced.
    – MaQleod
    Feb 7, 2014 at 1:40

1 Answer 1


The lowest level I've seen is the Win32 API using C. Everything I know about that came from "Programming Windows" by Charles Petzold.

Not the answer you're looking for? Browse other questions tagged or ask your own question.