Problems when used in the System.Windows.Forms Unity3.5.4

Good day! Pliz help solve the problem
Snippet:
using System.Windows.Forms;

OpenFileDialog fd = new OpenFileDialog ();
if (fd.ShowDialog () == DialogResult.OK)
{
MessageBox.Show (fd.FileName);
}

Added to the folder \ Assets \ Plugins next file System.Windows.Forms.dll, it was taken from:
C: \ Program Files (x86) \ Unity3.5.4 \ Editor \ Data \ MonoBleedingEdge \ lib \ mono \ 2.0
C: \ Program Files (x86) \ Unity3.5.4 \ Editor \ Data \ MonoBleedingEdge \ lib \ mono \ 4.0
C: \ Program Files (x86) \ Unity3.5.4 \ Editor \ Data \ Mono \ lib \ mono \ 2.0
C: \ Program Files (x86) \ Microsoft Visual Studio. NET 2003 \ CompactFrameworkSDK \ v1.0.5000 \ Windows CE
In all cases, the editor Unity two windows pop up one after another with the message: Oops Could not register the window class, win32 error 0
Then only a dialog box. Show you how to get rid of these windows?

When the dll was taken from C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727, Unity crashes and closes, offering me to send an error report

1 Like

I m also having same problem, but when u check with standalone exe its work fine. So check it with .exe.

You are right! I also worked as an exe file without failures)Thanks a lot!

Hi All,

I’m running into a similar issue. I’ve have a script that adds a drop down menu in the Unity editor. In that menu there is an options that launches a custom user form. Before the form appears, the annoying dialogue “Oops Could not…” Is there a way to get around this? Thanks!

OMG, this problem has be fix at 2012? so ,it looks like we are not same problem…