title: How to change the image to the size of the picture box?
body: <p>As the title says I can't see why the image isn't changing size. Can anyone see?</p>
  
  <pre><code>{
              OpenFileDialog dlg = new OpenFileDialog();
              dlg.Title = "Open bitmap or jpeg.";
              //dlg.Filter = "jpg files (*.jpg);*.jpg;*.* | bmp files (*.bmp); *.bmp";
              if (dlg.ShowDialog() == DialogResult.OK)
              {
                  this.pictureBoxMap1.Image = new Bitmap(dlg.OpenFile());
                  Image newImage = this.pictureBoxMap1.Image;
                  pictureBoxMap1.Height = newImage.Height;
                  pictureBoxMap1.Width = newImage.Width;
              }
              dlg.Dispose();
  </code></pre>