Picture Box Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How to adjust the location of the image in the picturebo
I want to set it at right hand corner.
Thank You
 
I don't think there's support for that directly, but you could work around
it by resizing the picturebox such that the top right corner of the image is
in the top right corner of the picturebox, such as:

Image bitmap = this.pictureBox1.Image;

this.pictureBox1.Bounds = new Rectangle(this.pictureBox1.Right -
bitmap.Width, this.pictureBox1.Top, bitmap.Width, bitmap.Height);
 
Back
Top