We help IT Professionals succeed at work.

Select Objects

tonelm54
tonelm54 asked
on
Im not sure if this is possible, or if I need to look at looking at positions of elements, but is it possible to select objects by drawing around them in run time?

What Im looking for is a way of having a form with several textboxes and/or labels, and detecting all the objects that have been selected inside the selection box?

Is this possible easily, or do I need to detect mouse down event and mouse up, and then look at each object for its position to see if its inside the selection box?

Thanks in advance for any advice :-)
Comment
Watch Question

Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Commented:
It's possible...but is this WinForms or WebForms?

Author

Commented:
WinForms

I don't think its possible using WinForms, without some MAD javascript
High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
Commented:
JavaScript in WinForms?...hahahaha!

Let me guess...you a WebForms developer that is new to WinForms?

Take a look at these...

Here's one way to draw a "rubberband":
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_21307643.html#13264101

This one is for use in a Panel:
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_21225194.html#12711055

Let me know if you need help.

Author

Commented:
Sorry, I meant the other way around!

What I meant to say was:-
WinForms

I don't think its possible using WebForms, without some mad javascript
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Commented:
That makes more sense now!  =)