Angry Larry
Angry Larry

Reputation: 1

Visual Studio 2015 C# Slow Click with PictureBox

I am using a PictureBox to cycle through a set of images on my program. When I click the image, the picture changes. When I click multiple times, sometimes it does not change. I assume this is because my clicks are being registered as a double-click, instead of a single-click?

If so, how can I "disable" double-click to enable fast scrolling through the images?

Upvotes: 0

Views: 559

Answers (1)

Ryan C
Ryan C

Reputation: 582

3 Options:

  1. (Lengthy Resolution) Disable all double clicks and have the application register all clicks as a single click: WinForms disable double clicks and accept all mouse clicks?

  2. (Not recommended...repetitive) Make the event handler for DoubleClick perform the same function as your onClick.

  3. (Preferred/Probably Easiest) Instead of your onClick making the pictures change....make the MouseDown/MouseUp event handler on the pictureBox process your picture change request.

Upvotes: 1

Related Questions