OpenFileDialog

  OpenFileDialog dialog = new OpenFileDialog();
            dialog.Filter = "All Files (*.*)|*.*";
            dialog.Multiselect = false;
            if (dialog.ShowDialog() == true)
            {
                txtKeyPath.Text = dialog.FileName;
            }

 

你可能感兴趣的:(dialog)