المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : MouseDown Event? [modified]



C# Programming
05-06-2009, 01:52 PM
In the past I had trouble with a PictureBoxes MouseUp event, but that fixed itself and never got an issue afterwards.
Now another of its events is causign me headaches.

MouseDown should occur when the cursor is above the control while a mouse button is held down, right?
So, selecting multiple cells in Excel uses the same principle or?

My problem is that I have a lot of PictureBoxes directly next to each other and with the MouseDown event I wanted the user to select multiple PictureBoxes.
Yet, it gets fired only once for the first time you click and hold a mouse button, it should get fired every time you select another PictureBox, but it only gets fired again after releasing the mouse button and pressing it again.
Of course, that makes selection impossible.

Could anyone tell me what went wrong and how can fix it?
I'm trying to achieve the same effect with the MouseHover event, but that will be a makeshift solution at best.

EDIT:
Scrap that part with the MouseHover event, that doesn't ever fire.

modified on Wednesday, May 6, 2009 5:32 AM