Are you trying to use the Outlook object model from a background thread?
That's not supported and will crash or hang Outlook. You have to marshal
that background thread to the main process thread if you are using the
object model.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"nitwalke@gmail.com" <nitwalkegmail.com.418a5m@invalid> wrote in message
news:nitwalkegmail.com.418a5m@invalid...
>
> Hi All,
>
> I have created outlook addin for outlook 2003 in vsto-2008. When I have
> tried to allow property 'allowDrag' to textbox it gives runtime
> exception "dragdrop registration did not succeed". I have searched on
> net, got suggestion to use threading.
>
> Thread t = new Thread(new ThreadStart(ShowForm));
> t.SetApartmentState(ApartmentState.STA);
> t.Start();
>
> public void ShowForm()
> {
>
> form.ShowDialog();
> form.Dispose();
> }
>
> Drag problem solved using thread but it give other problem in my
> application as follows
> a) When I right click on context menu then form disappear.
> b) Some time application hangs...
>
> Can I solve this problem without using thread? Because handling thread
> will almost change my design.
>
> Regards,
> Nit
>
>
> --
> nitwalke@gmail.com
> http://forums.slipstick.com
>




Bookmarks