I'm writing an application to display network events on a Windows form, using managed C++. A single Form is launched from main(), and in that I create a thread to loop round and react when network events occur. The event-queuing and data transmissions seem to work ok, but the program hangs sometimes for a few seconds when sending data (WSASend()), even though only a few bytes are being sent. The data structures used for the networking functions are declared as global variables above main - could accessing these from within the Form be the reason for problems?