Page 1 of 1

Resize control

Posted: Mon Aug 13, 2012 6:21 pm
by XTechVB
i have a picturebox an a button and im trying to resize the picturebox's width with the button like this
Code: Select all
picBox1.width +=5
but this resizes the picturebox on the right side, how can i resize it on the left side?

Re: Resize control

Posted: Mon Aug 13, 2012 6:33 pm
by AnoPem
XTechVB wrote:
i have a picturebox an a button and im trying to resize the picturebox's width with the button like this
Code: Select all
picBox1.width +=5
but this resizes the picturebox on the right side, how can i resize it on the left side?
Try resize and move its posistion

Re: Resize control

Posted: Mon Aug 13, 2012 6:39 pm
by XTechVB
never mind i got it.
Code: Select all
  picBox.SetBounds(picBox.Location.X - 5, picBox.Location.Y, picBox.Width + 5, picBox.Height)