DragDrop registration did not succeed.

Add-in Express™ Support Service
That's what is more important than anything else

DragDrop registration did not succeed.
 
julien romagnoli




Posts: 42
Joined: 2008-04-18
hi,

i use : VS2008 c#/ ADX.net 2008 Premium

i have a MenuAddressBar (with button) and InspectorCommandBar (with button)
i have a public class : "common" where I declare my forms



public class Common
{
       public Sender SenderForm;

       public Common()
       {
              SenderForm = new Sender();
       }
}


in adx code

public AddinModule()
{
       Common = new Common();
       InitializeComponent();event handler
}


....

void SenderAddressBook_Click(object sender)//MENU BAR BUTTON
{
       if (Common.SenderForm.Visible == true)
       {
              Common.SenderForm.Focus();
       }
       else
       {
              Common.SenderForm.Show();//No error
       }
}

....

private void AddressBookSenderButton_Click(object sender)//INSPECTOR BUTTON
{
       if (Common.SenderForm.Visible == true)
       {
              Common.SenderForm.Focus();
       }
       else
       {
              Common.SenderForm.Show();//<-- ERROR:  DragDrop registration did not succeed.
       }
}




and i put breakpoint on the load's senderform and he doesn't break



sorry for my bad english
Posted 06 Nov, 2008 17:09:17 Top
Eugene Astafiev


Guest


Hello Julien,

First of all, the add-in module constructor is not a suitable place for the applied code.

Could you send me the sources of the add-in to the support e-mail address (see readme.txt)? Please note that we can sign an NDA if required.

BTW What Outlook version do you use?
Posted 08 Nov, 2008 09:03:27 Top
julien romagnoli




Posts: 42
Joined: 2008-04-18
Hello,

i send the code
i tested with outlook 2003
Posted 10 Nov, 2008 13:20:35 Top
Andrei Smolin


Add-in Express team


Posts: 18819
Joined: 2006-05-11
Hello Julien,

I've added an event handler of the Load event to Form1, set a breakpoint on the first curly bracket of the event handler and run the project. The breakpoint works fine for me.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Nov, 2008 07:05:05 Top
julien romagnoli




Posts: 42
Joined: 2008-04-18
Hello,


i have found solution :)



private void AddressBookSenderButton_Click(object sender)//INSPECTOR BUTTON
{
       Thread t = new Thread(new ThreadStart(ShowSender));
       t.SetApartmentState(ApartmentState.STA);
       t.Start();
} 

public void ShowSender()
{
       Common.SenderForm.ShowDialog();
}
Posted 11 Nov, 2008 07:27:05 Top
Eugene Astafiev


Guest


Hello Julien,

You broke the ice! Thank you for sharing your knowledge.
Posted 11 Nov, 2008 09:53:07 Top