Hello NG
I am making a dll. in that dll i set reference to the System.Windows.Forms
to be able to get the OpenFileDialog.
But when I use the :
If ( OFD.ShowDialog() == System.Windows.Forms.DialogResult.OK )
I get the error:
"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."
How to prevent this error, and to open the open file dialog.
Kind regards.
Johnny E. Jensen