现在我有这段代码可以从名为 MDIParent1 的 MDIParent 窗口打开图像
private void OpenFile(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Filter = "Image Files (*.jpg)|*.jpg|All Files (*.*)|*.*";
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
{
string FileName = openFileDialog.FileName;
Process.Start(@FileName);
}
}
这将打开一个带有我的图像的新窗口,但是我希望它作为 MDIParent1 的子窗口打开。任何帮助将不胜感激。谢谢你