Picture Box Problem

G

Guest

How to adjust the location of the image in the picturebo
I want to set it at right hand corner.
Thank You
 
E

Ed Kaim [MSFT]

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);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top