Simulate mouse moves and clicks

You can move mouse cursor and simulate clicking programmatically using just one simple procedure.
In code below is one simple example to activate Start menu. Mouse cursor is moved to left-bottom corner of screen and then the left mouse button is “pressed and released”. Of course, this example will work only if you have “standard” Start menu position (bottom of screen), but example just shows the principle.

To simulate right button, use MOUSEEVENTF_RIGHTDOWN and MOUSEEVENTF_RIGHTUP parameters.