正如标题所述,我不明白为什么图片的大小没有改变。有人能看得出来吗?
{
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();
SizeMode
属性当前设置为什么? - Jeff