if (openFileDialog1.ShowDialog() == DialogResult.OK) { textBox1.Text = openFileDialog1.FileName; }
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process
[STAThread] static void Main(string[] args) { // rest of the code goes here }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)