Multiple objects in the handles of a sub – Visual Studio

5 pts.
Tags:
Visual Studio
Visual Studio 2008
I'm trying to detect if the mouse is down over a group of objects. Doing this individually for each object is not an option. I was thinking it would look like "Handles ______[1-512].MouseDown", but nothing I tried worked, and google didn't return anything useful.


Software/Hardware used:
Visual Studio 2008

Answer Wiki

Thanks. We'll let you know when a new response is added.

You would have to enumerate all the events the handler is going to handle.

Something like this:

<pre>Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) <b>Handles Me.MouseDown, Button1.MouseDown, Button2.MouseDown</b>

End Sub</pre>

Each event in the event list that the procedure is going to handle must be specified in the form of <object>.<event> (not <object array>.<event> or <object list>.<event>).

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following