Results 1 to 4 of 4

Thread: Program freezes upon closing

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    14

    Program freezes upon closing

    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.

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Program freezes upon closing

    You are not closing your open objects and setting then to nothing.

    Look here

  3. #3
    Frenzied Member zynder's Avatar
    Join Date
    Nov 2006
    Location
    localhost
    Posts
    1,434

    Re: Program freezes upon closing

    or maybe you're stuck on a loop or your doing a process that you app is not yet ready to end process?

    As randem had stated, set all your object to nothing before exiting.

    Anyway, try this first.

    VB Code:
    1. Private Sub Form_Unload(Cancel As Integer)
    2.     DoEvents
    3. End Sub

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Program freezes upon closing

    Quote Originally Posted by zynder
    VB Code:
    1. Private Sub Form_Unload(Cancel As Integer)
    2.     DoEvents
    3. End Sub
    This would serve no purpose...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width