Click Event Example

In this example, each time a PictureBox control is clicked it moves diagonally across a form. To try this example, paste the code into the Declarations section of a form that contains a PictureBox control positioned at the lower-left corner of the form, and then press F5 and click the PictureBox.

Private Sub Picture1_Click ()
   Picture1.Move Picture1.Left + 750, Picture1.Top - 550
End Sub