picturebox - How to move picture boxes in a panel using vb.net -


i'm trying move picture boxes in panel.

this code:

private dragging boolean private beginx, beginy integer  private sub control_mousedown(byval sender object, byval e system.windows.forms.mouseeventargs)         dragging = true         beginx = ctype(sender, picturebox).location.x         beginy = ctype(sender, picturebox).location.y end sub  private sub control_mousemove(byval sender object, byval e system.windows.forms.mouseeventargs)         dim cntrl control = ctype(sender, control)         if dragging = true             cntrl.location = new point(cntrl.location.x + e.x - beginx, cntrl.location.y + e.y - beginy)             'me.refresh()         end if end sub  private sub control_mouseup(byval sender object, byval e system.windows.forms.mouseeventargs)         dragging = false end sub 

i can't figure out why don't work.

the subroutines have missing handlers (ie handles statement) @ end.

ex:

private sub control_mouseup(byval sender object, byval e system.windows.forms.mouseeventargs) handles controlname.mouseup     dragging = false end sub 

Comments