title: How to select multiple controls by mouse-dragging over them
body: <p>I want to be able to drag over a bunch of controls and select those of a certain type (TextBoxes).</p>
  
  <p>Once the dragging action has been completed, I want to display an inputbox (yes, I'll have to reference/use the VB .dll) prompting the user for the value that will be entered in each selected TextBox.</p>
  
  <p>Can this be done? (of course, but how?)</p>
  
  <p>Or is there another way to accomplish the same thing (allow the user to quickly select multiple controls and then perform an action on all of them at once)?</p>
  
  <h2>Updated:</h2>
  
  <p>I've got this sort of working - the "caveat" or "gotcha" being that I have to pop up a MessageBox.Show() to the user for it to work. Essentially, I:</p>
  
  <p>Set a boolean to true on the container's (FlowLayoutPanel, in my case) MouseDown event, if the right mouse button was selected.</p>
  
  <p>Set that same boolean to false on the container's MouseUp event, if the right mouse button was selected.</p>
  
  <p>I then have a shared MouseHover event handler for all of the TextBoxes on that form that, if the boolean is true, changes the BackColor (to Gainsboro, in my case, from Window).</p>
  
  <p>In the container's MouseUp event, I also use an InputBox (referencing/importing/using the VB .dll) requesting the user enter the value that will be common for the "highlighted" TextBoxes. I then loop through them, looking for those with that BackColor, and assing the user-supplied value to their Text properties.</p>
  
  <p>Voila!</p>
  
  <p>Unfortunately, the TextBoxes' Modified property does not seem to be altered when you assign it values this way, so I had to work around that (explicitly setting the "Save" button to enabled), and I had to add more code to duplicate my KeyPressed code which limits the values entered by the user.</p>
  
  <p>So, it is, of course, possible, albeit a little kludgy. I haven't decided if the MessageBox.Show() is a "bug" or a feature, though...</p>
  
  <p>A related post is: <a href="https://stackoverflow.com/questions/10323824/why-does-mousehover-event-only-get-called-if-a-messagebox-show-or-breakpoint-o">Why does MouseHover event only get called if a messagebox.show() or breakpoint occurs before it?</a></p>