F Frank Rizzo Jul 13, 2005 #1 How can I retrieve the dimentions of the image that's been loaded into a picture box? Thanks
V Vagabond Software Jul 13, 2005 #2 Frank Rizzo said: How can I retrieve the dimentions of the image that's been loaded into a picture box? Thanks Click to expand... Read the pictureBox1.Image.Size.Width/Height properties. Here is a snippet: --- code --- private void Form1_Load(object sender, System.EventArgs e) { label1.Text = pictureBox1.Image.Size.Width.ToString(); label2.Text = pictureBox1.Image.Size.Height.ToString(); } --- end code --- Good Luck, carl
Frank Rizzo said: How can I retrieve the dimentions of the image that's been loaded into a picture box? Thanks Click to expand... Read the pictureBox1.Image.Size.Width/Height properties. Here is a snippet: --- code --- private void Form1_Load(object sender, System.EventArgs e) { label1.Text = pictureBox1.Image.Size.Width.ToString(); label2.Text = pictureBox1.Image.Size.Height.ToString(); } --- end code --- Good Luck, carl