private void browseButton_Click(object sender, EventArgs e) { DialogResult result; Bitmap bitmap; result = openFileDialog.ShowDialog(this); if (result == DialogResult.OK) { try { _file = new CfsFile(openFileDialog.FileName); bitmap = _file.ToBitmap(); cfsPictureBox.Image = bitmap; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }