VB Exit by the X box

I have written a reasonably complex VB code that when exited by the upper right corner X box, leaves itself in memory. The exit box control I added exits fine. Each time a user exits via the X box an additional copy is left in memory (as viewed by the Task Manager). Am I doning something wrong that is causing this problem



Answer this question

VB Exit by the X box

  • Chris Chilvers

    I didn't purposely create any threads. I'm not doing anything real fancy. Mostly, I am using a Microsoft Access database and a lot of textboxes and lists to input and display the database details. What I don't understand is why my exit box subroutine with a simple "END" causes a complete exit and the X box routine, whatever that is, leaves a copy in memory.

    Other code I have written, that is similar in many ways, does not behave the same way.


  • -chin-

    Hmm... I'm not entirely sure what you're talking about, but have you tried adding the END statement into the Form_Close method


  • omar seyam

    Thanks, that did it.

  • Naldiian

    no problem


  • Peter Y

    The common cause I see for this is when one has created threads of their own to do work and did not set their IsBackground property to True. Could this be your case as well

  • VB Exit by the X box