if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
textBox1.Text = openFileDialog1.FileName;
}
FileInfo fileInfo = new FileInfo(this.textBox1.Text);
string ext = fileInfo.Extension;
string desc = (string)Registry.ClassesRoot.OpenSubKey(ext).GetValue(null);
string typeinfo = (string)Registry.ClassesRoot.OpenSubKey(desc).GetValue(null);
listBox1.Items.Add(desc);
listBox1.Items.Add(typeinfo);