北京理工大学金旭亮老师C#(35—ShowPicInForm)

2019-04-15 15:21发布

/// /// Load pic from file. /// private void LoadPicture() { if (openFileDialog1.ShowDialog() == DialogResult.OK) { // MessageBox.Show(openFileDialog1.FileName); pictureBox1.ImageLocation = openFileDialog1.FileName; } else { MessageBox.Show("User Canceled."); } }