In Microsoft.NET Framework there is a Form class in the namespace called System.Windows.Forms, and in there defined many events. The event KeyPressed occurs at the moment a key was pressed on the keyboard while the Form itself has input focus. But if I want that something will happen when a key is pressed at anytime no matter if the Form has input focus or not, I know that I can run a timer, and dllimport the GetKeyState, or GetAsyncKeyState functions from user32.dll, and know when a key was pressed at anytime.
The same thing I can do with the mouse with Form's MouseDown event and without, with the same user32.dll functions and a timer, but when I scroll up or down my mouse wheel, I can program that something will happen with the Form's MouseDown event.
Delta is the value for mouse wheel event at MouseEventArgs, but it occurs not only if the mouse wheel was scrolled up or down, but I need input focus on that Form with the MouseEvent.
I don't want to be dependent on any Form. I don't know which integer to give to the GetKeyState or GetAsyncKeyState functions to get the state of the mouse wheel, so I can run a piece of code in an if of a function that a timer calls frequently.
What should I do? Which integer is it? Is there an other function from user32 or other dll that can return the "Delta"? I will be happy if I will know, so please answer! :D