Posted 19 years ago
by Chris Austin
![Avatar](https://secure.gravatar.com/avatar/8461f830d0a7ca444f8953fa4da2a884.jpg?s=64&d=identicon&r=g)
I'm getting an InvalidOperationException "DragDrop registration failed." when I try to add a document programmatically.
I've created a "dummy" user control with a label and text box on. When I add the control with the following code, I get the above exception:
private void menuItem3_Click(object sender, EventArgs e)
{
Dummy control = new Dummy();
DocumentWindow docWin = new DocumentWindow (dockManager1, "key", "hello", null, control);
docWin.Activate();
}
It works when MdiDocumentStyle is "Standard", but I get the exception when MdiDocumentStyle is "Tabbed".
I've created a "dummy" user control with a label and text box on. When I add the control with the following code, I get the above exception:
private void menuItem3_Click(object sender, EventArgs e)
{
Dummy control = new Dummy();
DocumentWindow docWin = new DocumentWindow (dockManager1, "key", "hello", null, control);
docWin.Activate();
}
It works when MdiDocumentStyle is "Standard", but I get the exception when MdiDocumentStyle is "Tabbed".