I am making a game that requires a rectangle to stay with the cursor position on the X-axis, but only move at a certain speed. How would I do this? Any help is appreciated.

Check out MouseDown, MouseUp and MouseMove events.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.