My game freezes when closing down. VB6 stops responding and it's getting incredibly annoying Either by manually clicking the close button in the application, or by doing so in the IDE. It tends to happen more when I hit pause, then close it in the IDE. I think it has something to do with either DirectX8 or Winsock, but I cannot be completely sure. There is also a game loop in the code that might have something to do with it.

Would anyone with experience be able to tell me what might be causing these problems?

Thanks.