i wrote this code but when i run it the debugger prompt me "DragDrop registration did not succeed." in FormAdver.show(); line , how can i fix it ?
    public void ResiveFunc(string FuncResive)
    {
        string FuncName = "";
        string FuncValue = "";
        for (int i = 0; i <= 2; i++)
        {
            FuncName += FuncResive[i];
        }
        开发者_StackOverflowfor (int j = 4; j <= FuncResive.Length - 1; j++)
        {
            FuncValue += FuncResive[j];
        }
        MessageBox.Show(FuncName);
        MessageBox.Show(FuncValue);
        if (FuncName == "TAB")
        {
            Form1 mainForm = new Form1();
            frmAddver formAddver = new frmAddver();
            formAddver.Show();
            mainForm.AdverFilter(FuncValue);
        }
    }
You have two options
- Make sure - AllowDropis- falseon the controls in FormAdver
- Make sure the the Apartment State is set to STA. Either by - Thread.CurrentThread.ApartmentState = ApartmentState.STAor using the- [STAThread]attribute.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论