Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ resources

18. Windows Forms Tips

18.32 I get a message 'DragDrop registration' failed. Why?


Try placing the attribute [STA Thread] on your Main method. OLE D&D requires single threaded apartments.

[STAThread]
static void Main()
{
     Application.Run(new Form1());
}