Posted 20 years ago
by Chris Austin

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".