Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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

Discussion in 'Scripting' started by s050107511, Sep 21, 2012.

  1. s050107511

    s050107511

    Joined:
    Sep 21, 2012
    Posts:
    9
    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?
     
  2. s050107511

    s050107511

    Joined:
    Sep 21, 2012
    Posts:
    9
    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
     
    Seraphim-Whiteless likes this.
  3. UnityCoder

    UnityCoder

    Joined:
    Dec 8, 2011
    Posts:
    534
    I m also having same problem, but when u check with standalone exe its work fine. So check it with .exe.
     
  4. s050107511

    s050107511

    Joined:
    Sep 21, 2012
    Posts:
    9
    You are right! I also worked as an exe file without failures)Thanks a lot!
     
  5. Crashnorun

    Crashnorun

    Joined:
    Jul 30, 2015
    Posts:
    6
    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!
     
  6. ZukoFire

    ZukoFire

    Joined:
    Apr 18, 2018
    Posts:
    2
    OMG, this problem has be fix at 2012? so ,it looks like we are not same problem...
     
unityunity