u can use GDI+ in c# and implement selection tool with my own i
i used MouseDownevent , MouseMoveevent , MouseUpevent and PaintEvent
declare refernce of Point as start point for ex:
Point startPoint = Point.empty;
Write in Mouse Down event:
startPoint = new (e.X,e.Y);
Write in Mouse Move event
Graphics g = this.CreateGraphics()l
sorry i did not send the code because am work here and unfortunlly i don`t have c# editor :( . and sorry i forget daniweb convention for writting code ;
As BlackSun explained, you will need to manage it yourself using the image Graphics. It is a bit more complicated than the example above, but should move you into the right direction. The image onPaint event will have to remember that you have an active selection (the rectangle, and its deminsions) so that if you refresh the form, the selection will be persistent. You may want to use a popup menu, or something to grab that selection of the image and copy it to another bitmap object for processing (send to file, drag drop, whatever).
Are you drawing the rectangle inside of the Paint event of the picture box ?
Need to, and sending the picturebox to the background has no effect because you are drawing on top of the object no matter where it is in the Z order.
Thanks a lot!
Now I am seeing all the mess in what I wrote...
All what you wrote makes sense, but I'll glad to know why are you put a '_' before each variable? I assume this is the proffesional syntax but as a beginner I haven't get any explenation about this.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...