Gentle Advisors,
I have a form where a button selects an image and passes it on a control of this form and an other one.
I wanted to debug the statements but I got an error message at the source line
:
"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttrib ute marked on it. This exception is only raised if a debugger is attached to the process."
What have I to do? What have I to insert in Main?
Regards
Frank
I have a form where a button selects an image and passes it on a control of this form and an other one.
I wanted to debug the statements but I got an error message at the source line
Code:
if (openFileDialog1.ShowDialog() == DialogResult.OK)
"Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttrib ute marked on it. This exception is only raised if a debugger is attached to the process."
What have I to do? What have I to insert in Main?
Regards
Frank
Comment