Hello,
I'm trying to change the location of a generated PictureBox using code.
It work's fine using mouse:
but whenever I try to use a button I get this error:Code:Private Sub myPictureBox_MouseDown(sender As Object, e As MouseEventArgs) Dim PB As PictureBox = CType(sender, PictureBox) Select Case PB.Name.ToString Case "PictureBox" + TextBox7.Text X = Control.MousePosition.X - PB.Location.X Y = Control.MousePosition.Y - PB.Location.Y TextBox3.Text = PB.Width TextBox2.Text = PB.Height End Select End Sub
I know it may be easy for You to to fix it, but I don't know how to this![]()




Reply With Quote
