int newHeight = pbImage.ClientRectangle.Height; double multiplier = (newHeight / 768D); int newWidth = ((int)Math.Ceiling(512 * multiplier));
//having PictireBox myPictireBox = //... //... //you can find the required aspect ratio using int width = myPictireBox.Image.Width; int height = myPictireBox.Image.Height; //and from here, you can adjust myPictireBox.Width or myPictireBox.Height accordingly
PictureBox
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)