Hi all,
I used dotnetmagic library and created a dockable window, that when run from IDE (VS2005) works, but when I use the executable it raises an exception which reads:
System.InvalidOperationException: DragDrop registration did not succeed. --->
System.Threading.ThreadStateException: Current thread must be set to single
thread apartment (STA) mode before OLE calls can be made. Ensure that
your Main function has STAThreadAttribute marked on it.
at System.Windows.Forms.Control.SetAcceptDrops(Boolean accept)
--- End of inner exception stack trace ---
at System.Windows.Forms.Control.SetAcceptDrops(Boolean accept)
at System.Windows.Forms.Control.OnHandleCreated(EventArgs e)
at System.Windows.Forms.Control.WmCreate(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(
IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
how to cut out these thing, can anyone help me to solve this?