locked
dragdrop registration did not succeed RRS feed

  • Question

  • From static method, call Form1.Show and error occur like following.

    dragdrop registration did not succeed......

    I put log to find where that error occur.

    Program run Form1's constructor and error occur before Form_Load event starts.

    There's another static method that calls Form1.Show and works well.

    That error occur when it is called from one static method.

    Have anybody experienced this?

       

    • Moved by CoolDadTx Wednesday, February 19, 2020 9:20 PM Winforms related
    Wednesday, February 19, 2020 3:17 AM

Answers

  • Hi Jeff,

    Thank you for posting here.

    There are many reasons for this error.

    First, check if the main method has  [STAThread] attribute.

    If it has, try deleting the bin directory and recompiling (please back up the data first to avoid unnecessary loss).

    If none works, can you provide some code that can reproduce this problem, or a detailed description of some special operations that may cause this problem, which will help us reproduce and resolve this problem more quickly.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, February 20, 2020 3:27 PM
    Wednesday, February 19, 2020 6:08 AM
  • Hi Jeff,

    I haven't encountered this problem, but I found some topics posted by people with the same problem.

    Check it out to see if it helps. Especially the third one, it seems that he is performing an operation similar to yours.

    DragDrop Registration did not Succeed

    "DragDrop registration did not succeed" exception 

    DragDrop registration did not succeed.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, February 20, 2020 3:27 PM
    Thursday, February 20, 2020 9:49 AM

All replies

  • Hi Jeff,

    Thank you for posting here.

    There are many reasons for this error.

    First, check if the main method has  [STAThread] attribute.

    If it has, try deleting the bin directory and recompiling (please back up the data first to avoid unnecessary loss).

    If none works, can you provide some code that can reproduce this problem, or a detailed description of some special operations that may cause this problem, which will help us reproduce and resolve this problem more quickly.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, February 20, 2020 3:27 PM
    Wednesday, February 19, 2020 6:08 AM
  • I'll explain the structure of my program roughly.

    There's a background process(A), WinForm but hidden into the system tray.

    The background process(A) has timer which check the status something.

    If it meets some condition, call the static method(B1) in the separate DLL(B).

    If it meets some condition from the static method(B1), show some Form in the separate DLL(C).

    The error occur at this point.

    In your comment(First, check if the main method has  [STAThread] attribute.), Do you want me to check the [STAThread] attribute of A's main()?

    This is the calling part.

    <FormA>

    foreach (ReminderSchedule reminderschedule in reminderschedulelist) { CDMrCommon.Instance.ReadReminderMessageResource(chattingsessionlist, ref messagelistdict, reminderschedulelist, reminderschedule); }

    And this is the method.

    <CommonDll>

    public void ReadReminderMessageResource(List<ChattingSession> chattingsessionlist, ref MessageListDict messagelistdict, List<ReminderSchedule> reminderschedulelist, ReminderSchedule remindschedule)

    {

    ...

    chattingsession.Show();

    ...

    }

    ChattingSession class is in another separate DLL.


    • Edited by Jeff0803 Thursday, February 20, 2020 2:27 AM
    Wednesday, February 19, 2020 4:39 PM
  • Hi Jeff,

    I haven't encountered this problem, but I found some topics posted by people with the same problem.

    Check it out to see if it helps. Especially the third one, it seems that he is performing an operation similar to yours.

    DragDrop Registration did not Succeed

    "DragDrop registration did not succeed" exception 

    DragDrop registration did not succeed.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, February 20, 2020 3:27 PM
    Thursday, February 20, 2020 9:49 AM
  • When I call ChattingSession.Show through Invoke, what Invoke should be of?

    Should I pass FormA to ReadReminderMessageResource(for example myForm) and call like following?

    myForm.Invoke((MethodInvoker)delegate () {
            myForm.Show();
    });

    And what should I put into Invoke?

    Is only myForm.Show() enough? or should I put other things else?

    Is it correct?

      


    • Edited by Jeff0803 Thursday, February 20, 2020 3:46 PM
    Thursday, February 20, 2020 3:33 PM