After browsing, I have found that
mouse_event(MOUSEEVENTF_WHEEL, 0, 0, 120, 0);
is used to simulate scrolling Event of the mouse where MOUSEEVENTF_WHEEL=0x800.
But its not working with me. So please give me some other solutions to the problem.
I am working in C#.
Cheers
That code works perfectly well. I trust you realise that you must have the input focus set to the control that you want to receive the mouse wheel input messages. Are you sure that you defined
MOUSEEVENTF_WHEELcorrectly? The only other possibility that I can think of is that your window is already scrolled to the top. Note that your delta value of 120 will scroll upwards. Try passing(uint)-120instead which is what you would need to scroll down.