Hi,

I have a "typical" test program for drawing a "rubberband" or "rubber box" onto a picture box control. I would like to separate out the drawing of the rubberband into a stand-alone subroutine.

My picture box control (pic1) would still remain on the main-form, and then I would like to call the subroutine, e.g. as:

Call DrawRubberBox(pic1).

In the subroutine:

Public sub DrawRubberBox(p1 as PictureBox)
...
end sub

It is frustrating that p1_MouseDown(...) is NOT recognized, even though I have declared it as:


Set p1= new PictureBox

The MS help indicates that the MouseDown event applies to objects too (e.g. PictureBox)

Please help